摘要:
题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1048The Hardest Problem Ever 1 #include<iostream.h> 2 #include<string.h> 3 int main() 4 { 5 int i, k, n ; 6 char x,c[201], s[20], d[4], h[11]={"ENDOFINPUT"} ; 7 while(cin.getline(c, 200) ) 8 { 9 if(strcmp(c,h) == 0)10 ... 阅读全文
摘要:
题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1013Digital Roots 1 #include<iostream> 2 #include<string> 3 using namespace std; 4 int devide(int n) 5 { 6 int s = 0 ; 7 while(n) 8 { 9 s = s+n%10 ;10 n = n/10 ;11 }12 return s ;13 }14 int main()15 {16 int s ;17 ... 阅读全文