CF2140B.Another Divisibility Problem

传统题 时间 2000 ms 内存 256 MiB 4 尝试 1 已通过 1 标签

Another Divisibility Problem

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

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

Here x#yx\operatorname{\#}y denotes the integer formed by concatenating the integers xx and yy in that order. For example, if x=835x = 835, y=47y = 47, then x#y=83547x \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 tt (1t1041 \le t \le 10^4). The description of the test cases follows.

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

Output

For each test case, print a single integer yy (1y<1091 \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=8x = 8, we can choose y=1y = 1, and we have x#y=81x \operatorname{\#} y = 81, which is divisible by x+y=9x + y = 9.

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

Samples

6
8
42
1000
66666
106344
9876543
1
12
998
7872
8190
174036

在线编程 IDE

建议全屏模式获得最佳体验