HDU 5832 A water problem
A water problem
Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 595 Accepted Submission(s): 308
There is 73 days in Xixi a year and 137 days in Haha a year.
Now you know the days N after Big Bang, you need to answer whether it is the first day in a year about the two planets.
For each test, we have a line with an only integer N(0≤N), the length of N is up to 10000000.
0
333
#include <cstdio> const int MAXN = 10000000+5;
char s[MAXN]; int main()
{
int cn = 0;
while(~scanf("%s", s)){
int mod = 0;
for(int i = 0; s[i] != '\0'; ++i){
mod = (mod*10+s[i]-'0')%10001;
}
if(mod == 0)
printf("Case #%d: YES\n", ++cn);
else
printf("Case #%d: NO\n", ++cn);
}
return 0;
}
HDU 5832 A water problem的更多相关文章
- HDU 5832 A water problem(某水题)
p.MsoNormal { margin: 0pt; margin-bottom: .0001pt; text-align: justify; font-family: Calibri; font-s ...
- HDU 5832 A water problem (带坑水题)
A water problem 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5832 Description Two planets named H ...
- HDU 5832 A water problem 水题
A water problem 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5832 Description Two planets named H ...
- HDU 5832 A water problem (水题,大数)
题意:给定一个大数,问你取模73 和 137是不是都是0. 析:没什么可说的,先用char 存储下来,再一位一位的算就好了. 代码如下: #pragma comment(linker, "/ ...
- hdu 5443 The Water Problem
题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5443 The Water Problem Description In Land waterless, ...
- hdu 5443 The Water Problem 线段树
The Water Problem Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php? ...
- hdu 5443 The Water Problem(长春网络赛——暴力)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5443 The Water Problem Time Limit: 1500/1000 MS (Java ...
- HDU 5443 The Water Problem (ST算法)
题目链接:HDU 5443 Problem Description In Land waterless, water is a very limited resource. People always ...
- ACM学习历程—HDU 5443 The Water Problem(RMQ)(2015长春网赛1007题)
Problem Description In Land waterless, water is a very limited resource. People always fight for the ...
随机推荐
- 时序列数据库武斗大会之TSDB名录 Part 2
[编者按] 刘斌,OneAPM后端研发工程师,拥有10多年编程经验,参与过大型金融.通信以及Android手机操作系的开发,熟悉Linux及后台开发技术.曾参与翻译过<第一本Docker书> ...
- 主题:PageRank解释
转自:http://www.iteye.com/topic/95079 PageRank解释 通过对由超过 50,000 万个变量和 20 亿个词汇组成的方程进行计算,PageRank 能够对网页的重 ...
- 李洪强漫谈iOS开发[C语言-009] - C语言关键字
// // main.m // 04 - C语言关键字 // // Created by vic fan on 16/7/12. // Copyright © 2016年 李洪强. All r ...
- Python图片与其矩阵数据互相转换
程序 # coding=gbk from PIL import Image import numpy as np # import scipy import matplotlib.pyplot as ...
- 推荐:根据ISBN号查询图书信息的API - 豆瓣API
转帖,出处:http://blog.csdn.net/berryreload/article/details/9126645 版权声明:本文为博主原创文章,未经博主允许不得转载. 找了半天,还是豆瓣的 ...
- Filter(过滤器)常见应用
孤傲苍狼 只为成功找方法,不为失败找借口! javaweb学习总结(四十六)——Filter(过滤器)常见应用 一.统一全站字符编码 通过配置参数charset指明使用何种字符编码,以处理Html F ...
- java--依赖、关联、聚合和组合之间区别的理解
在学习面向对象设计对象关系时,依赖.关联.聚合和组合这四种关系之间区别比较容易混淆.特别是后三种,仅仅是在语义上有所区别,所谓语义就是指上下文环境.特定情景等. 依赖(Dependency)关系是类与 ...
- jQuery编程基础精华01(jQuery简介,顶级对象$,jQuery对象、Dom对象,链式编程,选择器)
jQuery简介 什么是jQuery? jQuery就是一个JavaScript函数库,没什么特别的.(开源)联想SQLHelper类 jQuery能做什么?jQuery是做什么的? jQuery本身 ...
- *windows下安装以及配置nginx
1.从nginx官网下载相应的安装包. http://nginx.org/
- Android PullToRefreshExpandableListView的点击事件
这几天做项目的时候用到了一个开源的下拉刷新的框架(需要的朋友可以加我Q:359222347).其中我使用PullToRefreshExpandableListView的时候发现这个东西没有setOnC ...