Define the function S(x)S(x) for xx is a positive integer. S(x)S(x) equals to the sum of all digit of the decimal expression of xx. Please find a positive integer kk that S(k*x)\%233=0S(k∗x)%233=0.
Input Format
First line an integer TT, indicates the number of test cases (T \le 100T≤100). Then Each line has a single integer x(1 \le x \le 1000000)x(1≤x≤1000000) indicates i-th test case.
Output Format
For each test case, print an integer in a single line indicates the answer. The length of the answer should not exceed 2000
2000. If there are more than one answer, output anyone is ok.
------------------------------------------------------------------------------------------------------------------
数字9有一个规律:S(9)=9=1*9 S(2*9)=1+8=9=1*9 S(3*9)=2+7=9=1*9;
总结为:99……99(n个9)*m=s,s的各位和是9*n。其中,m≤99……99+1。
所以在这个题中,S(9……9(233个9)*x)%233=(233*9)%233=0;
题目地址:点击打开链接