hdu 5832 A water problem(大数取模)
2016-08-15 17:28
561 查看
题目链接
思路:大数取模,73*137=10001,所以对10001取模
代码
思路:大数取模,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 ; 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; }
相关文章推荐
- 【HDU 5832】A water problem(大数取模)
- HDU 5832 A water problem (大数取模)
- HDOJ 5832 a water problem(大数取模)
- HDOJ 5832 A water problem(高精度 大数取模)
- HDU 5832:A water problem (大数整除)
- HDU 5832 A water problem 【大数取模,Java 大数也不是万能的。。】
- HDU - 5832 A water problem(大整数取模)
- hdu5832 A water problem (大数求余)
- HDU 5832 A water problem【大数问题】
- HDU-5832 A water problem(特殊的取模方法)
- HDU 5832 A water problem(取模~)—— 2016中国大学生程序设计竞赛 - 网络选拔赛
- A water problem(大数取模)
- HDU 5832 A water problem
- HDU-5832-A water problem【2016CCPC网络赛】
- HDU 5832 A water problem
- HDU 5832 A water problem (带坑水题)
- HDU 5832 A water problem
- HDU 5832 A water problem (水题)
- A - A water problem HDU - 5832(模拟除法)
- hdu 5832 A water problem(简单数论)