Create 5832.cpp

pull/35/head
Kirigaya Kazuto 2016-08-14 17:20:04 +08:00 committed by GitHub
parent 3ea1771c15
commit 56be801fcc
1 changed files with 24 additions and 0 deletions

24
HDOJ/5832.cpp Normal file
View File

@ -0,0 +1,24 @@
#include <cstring>
#include <cstdio>
using namespace std;
#define MAXN 10005000
int a[MAXN];
int b[MAXN];
int len;
char str[MAXN];
int main()
{
int i=1;
while(scanf("%s", str)==1)
{
int tomod = 10001;
int ans = 0;
for(int j = 0; str[j]; j++)
ans = (ans * 10 + (str[j] - '0') % tomod) % tomod;
if(ans)
printf("Case #%d: NO\n", i++);
else
printf("Case #%d: YES\n", i++);
}
return 0;
}