欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

HDU 5832——A water problem 2016CCPC网络赛1001

发布时间:2023/11/30 编程问答 53 豆豆
生活随笔 收集整理的这篇文章主要介绍了 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的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。