标签:
Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 5814 Accepted Submission(s): 1238
#include <cstdio> #include <vector> #include <cstring> #include <algorithm> using namespace std; const int maxn=1e8+5; char s[maxn]; int ans,c; int main(){ while(~scanf("%s",s)){ ans=0; int len=strlen(s); for(int i=0;i<len;i++) ans=(ans*10+s[i]-‘0‘)%10001; if(!ans){ printf("Case #%d: YES\n",++c); } else printf("Case #%d: NO\n",++c); } }
标签:
原文地址:http://www.cnblogs.com/acmtime/p/5790024.html