标签:
1 /**2016中国大学生程序设计网络赛赛HDU 2 1001大数求余 3 */ 4 5 #include "iostream" 6 #include "cstdio" 7 #include "cstring" 8 using namespace std; 9 char s[100000002]; 10 int main() { 11 12 int t=1; 13 while(~scanf("%s", &s)) { 14 15 int m = 0,n=0; 16 for(int i = 0; i <strlen(s); i++) 17 { 18 m = (m*10+s[i]-‘0‘)%73; 19 n = (n*10+s[i]-‘0‘)%137; 20 } 21 22 if(m==0&&m==0) 23 { 24 printf("Case #%d: YES\n",t); 25 }else{ 26 printf("Case #%d: NO\n",t); 27 } 28 t++; 29 } 30 return 0; 31 }
标签:
原文地址:http://www.cnblogs.com/kimsimple/p/5779035.html