您的位置:首页 > 理论基础 > 计算机网络

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;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐