2016中国大学生程序设计竞赛 - 网络选拔赛 A Wtaer Problem
2017-07-21 16:32
435 查看
#include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> using namespace std; #define N 12000000 char s ; int main() { int k=0,len,x,d,i; while(scanf("%s",s)!=EOF) { k++; len=strlen(s); x=10001; d=0; for(i=0;i<len;i++) { d=(d*10+(s[i]-'0')%x)%x;从s[0]道s[n-1];把位数一步一步 } if(d==0) printf("Case #%d: YES\n",k); else printf("Case #%d: NO\n",k); } return 0; }
相关文章推荐
- HDU 5839 Special Tetrahedron(计算几何)——2016中国大学生程序设计竞赛 - 网络选拔赛
- HDU 5832 A water problem(取模~)—— 2016中国大学生程序设计竞赛 - 网络选拔赛
- 2016中国大学生程序设计竞赛 - 网络选拔赛 1001 A water problem
- 2016中国大学生程序设计竞赛 - 网络选拔赛——题目笔记
- 2016中国大学生程序设计竞赛 - 网络选拔赛 hdu 5839 Special Tetrahedron
- HDUOJ5835Danganronpa&&2016中国大学生程序设计竞赛 - 网络选拔赛1004
- 2016中国大学生程序设计竞赛 - 网络选拔赛
- 2016中国大学生程序设计竞赛 - 网络选拔赛【三水题 1001 && 1004 && 1011】
- HDU 5833 Zhu and 772002 2016中国大学生程序设计竞赛 - 网络选拔赛(高斯消元)
- 2016中国大学生程序设计竞赛 - 网络选拔赛
- 2016中国大学生程序设计竞赛 - 网络选拔赛 C. Magic boy Bi Luo with his excited tree
- 2016中国大学生程序设计竞赛 - 网络选拔赛 1004 Danganronpa
- HDUOJ5832A water problem&&2016中国大学生程序设计竞赛 - 网络选拔赛1001
- 2016中国大学生程序设计竞赛 - 网络选拔赛 1011
- 2016中国大学生程序设计竞赛 - 网络选拔赛 J. Alice and Bob
- 2016中国大学生程序设计竞赛 - 网络选拔赛 1004 Danganronpa hdu5835
- 2016中国大学生程序设计竞赛 - 网络选拔赛 1008 Special Tetrahedron hdu5839
- HDU 5832 A water problem(简单思维题目)【2016中国大学生程序设计竞赛 - 网络选拔赛】
- 2016中国大学生程序设计竞赛 - 网络选拔赛 1007 Mountain hdu5838
- hdu 5833 Zhu and 772002 2016中国大学生程序设计竞赛 - 网络选拔赛1002 [质因子分解+高斯消元]【数论】