标签:
1 #include <cstring> 2 #include <cstdio> 3 #include <iostream> 4 #include <algorithm> 5 #include <cmath> 6 #include <stack> 7 #include <vector> 8 #include <queue> 9 #include <cmath> 10 using namespace std; 11 #define N 10500000 12 typedef long long LL; 13 int a[N],b[N]; 14 int len; 15 16 int main() 17 { 18 19 20 int i=1; 21 char str[N]; 22 while(scanf("%s", str) != EOF) 23 { 24 25 int d = 10001; 26 int ans = 0; 27 for(int j = 0; str[j]; j++) 28 ans = (ans * 10 + (str[j] - ‘0‘) % d) % d; 29 30 31 if( ans == 0) 32 printf("Case #%d: YES\n", i++); 33 else 34 printf("Case #%d: NO\n", i++); 35 } 36 return 0; 37 }
标签:
原文地址:http://www.cnblogs.com/biu-biu-biu-/p/5770033.html