hdu_5832_A water problem(模拟)

题目链接:hdu_5832_A water problem

这是一个惨痛的教训,想这种这么大的大数肯定就是找个规律模拟一下。

然而我们队还写JAVA,用大数艹了13发罚时,真是TM智障了。

 1 #include<bits/stdc++.h>
 2 using namespace std;
 3 
 4 const int N=1e7+7;
 5 char a[N];int x,ic=1;
 6 
 7 int main()
 8 {
 9     while(~scanf("%s",a))
10     {
11         x=0;
12         for(int i=0;a[i]!='\0';i++)x=x*10+a[i]-'0',x%=10001;
13         if(x==0)printf("Case #%d: YES\n",ic++);else printf("Case #%d: NO\n",ic++);
14     }
15     return 0;
16 }
View Code

 

posted @ 2016-08-15 20:15  bin_gege  阅读(274)  评论(0编辑  收藏  举报