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]!='';i++)x=x*10+a[i]-'0',x%=10001;
13         if(x==0)printf("Case #%d: YES
",ic++);else printf("Case #%d: NO
",ic++);
14     }
15     return 0;
16 }
View Code
原文地址:https://www.cnblogs.com/bin-gege/p/5774213.html