HDU 6124-Euler theorem
来源:互联网 发布:qq三国辅助软件 编辑:程序博客网 时间:2024/05/17 23:00
Euler theorem
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 152 Accepted Submission(s): 128
题目链接:点击打开链接
Problem Description
HazelFan is given two positive integers a,b , and he wants to calculate amodb . But now he forgets the value of b and only remember the value of a , please tell him the number of different possible results.
Input
The first line contains a positive integer T(1≤T≤5) , denoting the number of test cases.
For each test case:
A single line contains a positive integera(1≤a≤109) .
For each test case:
A single line contains a positive integer
Output
For each test case:
A single line contains a nonnegative integer, denoting the answer.
A single line contains a nonnegative integer, denoting the answer.
Sample Input
2
1
3
Sample Output
2
3
2
1
3
Sample Output
2
3
题意:有 a 和 b 两个数,让求 a mod b ,但是 b 是不确定的数,让求a mod b 取膜有多少种情况。
分析:打表观察的,哈哈哈哈哈啊哈哈哈哈。。。。。。。
#include <iostream>#include<stdio.h>#include<cmath>using namespace std;int main(){ int a,t; scanf("%d",&t); while(t--) { scanf("%d",&a); printf("%d\n",(a+1)/2+1); } return 0;}
阅读全文
0 0
- HDU 6124 Euler theorem
- hdu 6124 Euler theorem
- HDU 6124-Euler theorem
- HDU 6124-Euler theorem
- hdu 6124 Euler theorem
- HDU 6124 Euler theorem【】
- hdu 6124 Euler theorem
- HDU 6124 Euler theorem
- HDU 6124 Euler theorem
- Euler theorem(HDU 6124)
- HDU 6124 Euler theorem(思维)
- hdu 6124 Euler theorem(水题)
- HDU 6124 Euler theorem(水+思维)
- HDU 6124 Euler theorem(数论)
- hdu 6124.Euler theorem
- hdu 6124 Euler theorem (多校联赛)
- hdu-6124-Euler theorem(多校训练)
- 17暑假多校联赛7.5 HDU 6124 Euler theorem
- 进程间通信-----消息队列
- Spark学习-SparkSQL--06-spark读取HBase数据报异常java.io.NotSerializableException
- 【opencv】vc6.0中opencv打开摄像头失败解决方法
- 独占锁和共享锁
- Intellij Idea 15 生成serialVersionUID的方法 默认情况下Intellij IDEA是关闭了继承了Serializable接口的类生成serialVersionUID的警
- HDU 6124-Euler theorem
- HDU-2149-Public Sale 【巴什博弈】
- win7系统mysql5.7.19安装配置教程
- java的运算优先级和字符串的类型转换
- mfc 非模态对话框的创建与显示
- 请教各位大神一个PHP问题(急)
- 草稿 -算法问题的历史。
- Unicode字符集
- 公司实战nginx之rewrite配置域名跳转