2017 ACM-ICPC 亚洲区(西安赛区)网络...
Define the function S(x) for x is a positive integer. S(x) equals to the sum of all digit of the decimal expression of x. Please find a positive integer k that S(k∗x)%233=0.
Input Format
First line an integer T, indicates the number of test cases (T≤100). Then Each line has a single integer 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. If there are more than one answer, output anyone is ok.
样例输入
1 1
样例输出
89999999999999999999999999
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
int T;
scanf("%d",&T);
while(T--)
{
int n;
scanf("%d",&n);
int i;
for(i=1;i<=233;i++)
printf("%d",(int)233/n);
printf("\n");
}
return 0;
}
what fuck?

浙公网安备 33010602011771号