#P13584. [NWRRC 2023] Divisibility Trick
[NWRRC 2023] Divisibility Trick
题目描述
Dmitry has recently learned a simple rule to check if an integer is divisible by 3. An integer is divisible by 3 if the sum of its digits is divisible by 3.
Later he also learned that the same rule can be used to check if an integer is divisible by 9. An integer is divisible by 9 if the sum of its digits is divisible by 9.
Dmitry's elder sister Daria wants to trick him by showing that the same rule can be applied to any divisor~. To do this, she wants to show Dmitry an example of a positive integer such that is divisible by , and the sum of the digits of is also divisible by . Help her to find such a number.
输入格式
The only line contains a single integer ().
输出格式
Print a positive integer divisible by such that the sum of its digits is also divisible by .
The value of must consist of at most digits and must not have leading zeroes. It can be shown that such an integer always exists. If there are multiple answers, print any of them.
3
3
13
1898
1
239
提示
In the first example, is divisible by , and its sum of digits, , is also divisible by .
In the second example, is divisible by , and its sum of digits, , is also divisible by .
In the third example, any positive integer satisfies the conditions.