A water problem
来源:互联网 发布:电脑软件升级 编辑:程序博客网 时间:2024/05/16 12:19
A water problem
Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 730 Accepted Submission(s): 377
Problem Description
Two planets named Haha and Xixi in the universe and they were created with the universe beginning.
There is73 days in Xixi a year and 137 days in Haha a year.
Now you know the daysN after Big Bang, you need to answer whether it is the first day in a year about the two planets.
There is
Now you know the days
Input
There are several test cases(about 5 huge test cases).
For each test, we have a line with an only integerN(0≤N) , the length of N is up to 10000000 .
For each test, we have a line with an only integer
Output
For the i-th test case, output Case #i: , then output "YES" or "NO" for the answer.
Sample Input
100010333
Sample Output
Case #1: YESCase #2: YESCase #3: NO
Author
UESTC
Source
2016中国大学生程序设计竞赛 - 网络选拔赛
Recommend
大数除法取余,模拟除法过程
#include <stdio.h>#include <string.h>using namespace std;int main(){ int i; char ch[10000005]; int mod, cnt = 1; while ( ~scanf ( "%s", ch ) ) { int len = strlen(ch); mod = 0; for ( i = 0; i < len; i++ ) { mod = (mod*10+ch[i]-'0')%10001; } if ( mod ) { printf ( "Case #%d: NO\n", cnt ); } else { printf ( "Case #%d: YES\n", cnt ); } cnt++; }}
代码菜鸟,如有错误,请多包涵!!!
如果有帮助记得鼓励我一下,谢谢!!!
0 0
- A simple water problem
- A water problem
- A water problem
- hdu5832 A water problem
- A water problem
- A water problem
- A water problem
- A water problem
- A water problem
- HDU5832-A water problem
- HDU4974:A simple water problem
- hdu 5832 A water problem
- HDU 5832 A water problem
- hdu 5832 A water problem
- HDU 5832 A water problem
- HDU 5832 A water problem
- DUT 1089 A Water Problem
- HDU4974 A simple water problem
- 数据结构实验:连通分量个数
- 蓝牙模块:详解蓝牙通信模块的使用
- linux 日志切割工具cronolog
- Hexo NexT 主题SEO优化指南
- java的Calendar(日历)类 (转)
- A water problem
- Creo二次开发:查找和替换指定文件夹下所有工程图中的符号
- SeekBar进度条背景图片和按钮图标的动态切换
- C++ tm 和 time_t 有关总结
- 100多个基础常用JS函数和语法集合大全
- Git的简单学习
- 带权并查集--删除--UVA11987
- SVN之红色感叹号处理方法
- java进程