首页 > 其他 > 详细

CF 260 B. Fedya and Maths

时间:2015-07-07 13:08:42      阅读:276      评论:0      收藏:0      [点我收藏+]

链接
提示:找规律

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
const int maxn=1e5+5;
char s[maxn];
int main()
{
   cin>>s;
   int len=strlen(s);
   int sum=(s[len-2]-‘0‘)*10+(s[len-1]-‘0‘);
   if(sum % 4 == 0)
     puts("4");
   else
     puts("0");
   return 0;
}

版权声明:本文为博主原创文章,未经博主允许不得转载。

CF 260 B. Fedya and Maths

原文:http://blog.csdn.net/qingshui23/article/details/46786083

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!