思路:大数取模,73*137=10001,所以对10001取模
代码
#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<string.h>
#include<map>
#include<queue>
#define LL long long
using namespace std;
const int N=10000005;
char s[N];
int main()
{
int n=1;
while(~scanf("%s",s))
{
int len=strlen(s);
LL sum=0;
for(int i=0;i<len;i++)
{
sum=(sum*10+s[i]-'0')%10001;
}
if(sum==0)
{
printf("Case #%d: YES\n",n++);
}
else
{
printf("Case #%d: NO\n",n++);
}
}
return 0;
}