标签:int Sum ACM ICPC indicates test answer integer line
题目
Define the function S(x) for xx 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
思路 直接输出233个9。因为任何正整数乘以9的数位和都是9的倍数
AC代码
#include <iostream>
using namespace std;
int main()
{
int T,n;
cin>>T;
while(T--){
cin>>n;
for(int i=1;i<=233;i++){
cout<<9;
}
cout<<endl;
}
return 0;
}
标签:int,Sum,ACM,ICPC,indicates,test,answer,integer,line 来源: https://blog.csdn.net/qq_37291934/article/details/90348095
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。