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;
题目地址:点击打开链接
本文探讨了一种特定的数学问题,即寻找一个正整数k,使得S(k*x)%233=0成立,其中S(x)定义为x的十进制表达式中所有数字之和。文章给出了问题的输入和输出格式,并通过一个具体的例子说明了解决方案。
2037

被折叠的 条评论
为什么被折叠?



