Codeforces Round 1049 (Div. 2)
B
Another Divisibility Problem
Codeforces
900
原题
← AC →
翻译中…

Alice and Bob are playing a game in which Alice has given Bob a positive integer $x \lt 10^8$.

翻译中…

To win the game, Bob has to find another positive integer $y \lt 10^9$ such that $x \operatorname{\#} y$ is divisible by $x + y$.

翻译中…

Here $x\operatorname{\#}y$ denotes the integer formed by concatenating the integers $x$ and $y$ in that order. For example, if $x = 835$, $y = 47$, then $x \operatorname{\#} y = 83\,547$.

翻译中…

However, since Bob is dumb, he is unable to find such an integer. Please help him.

翻译中…

It can be shown that such an integer always exists.

翻译中…

Input

翻译中…

Each test contains multiple test cases. The first line contains the number of test cases $t$ ($1 \le t \le 10^4$). The description of the test cases follows.

翻译中…

The only line of each test case contains a single integer $x$ ($1 \le x \lt 10^8$) — the integer that Alice has given to Bob.

翻译中…

Output

翻译中…

For each test case, print a single integer $y$ ($1 \le y \lt 10^9$) so that Bob can win the game.

翻译中…

If there are multiple answers, print any one of them.

翻译中…

Note

翻译中…

For the first test case, $x = 8$, we can choose $y = 1$, and we have $x \operatorname{\#} y = 81$, which is divisible by $x + y = 9$.

翻译中…

For the second test case, $x = 42$, we can choose $y = 12$, and we have $x \operatorname{\#} y = 4212$, which is divisible by $x + y = 54$.

翻译中…

样例

Input #1
6
8
42
1000
66666
106344
9876543
Output #1
1
12
998
7872
8190
174036
InputCopy OutputCopy
题目信息
题号
2140B
时间限制
1 s
内存限制
256 MB
标签
构造
数学
数论

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。