HDU 5832——A water problem 2016CCPC网络赛1001
生活随笔
收集整理的这篇文章主要介绍了
HDU 5832——A water problem 2016CCPC网络赛1001
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
题意:
给定一个数,问该数是否能够对10001取摸,能够就YES,否则为NO。
思路:
和题目样,水题,直接取摸即可。
code:
#include <bits/stdc++.h> using namespace std;char s[10000001]; const int mod=10001; int main() {int ca=1;while (~scanf("%s",s)){int a=0;for (int i=0;i<strlen(s);i++){a=a*10+(s[i]-'0');a%=mod;}printf("Case #%d: ",ca++);if (a==0){puts("YES");}else{puts("NO");}} }总结
以上是生活随笔为你收集整理的HDU 5832——A water problem 2016CCPC网络赛1001的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 成都大熊猫基地参观路线
- 下一篇: HDU 5842—— Lweb and