HDU 6124-Euler theorem
来源:互联网 发布:java云计算框架 编辑:程序博客网 时间:2024/05/21 13:56
addresss:http://acm.hdu.edu.cn/showproblem.php?pid=6124
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 integer a(1≤a≤109).
Output
For each test case:
A single line contains a nonnegative integer, denoting the answer.
Sample Input
2
1
3
Sample Output
2
3
code :
#include <iostream>#include <bits/stdc++.h>using namespace std;int main(){ int N; scanf("%d",&N); while (N--) { int x; scanf("%d",&x); x = (x+1)/2+1; printf("%d\n",x); } 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
- USACO第一单元全部参考代码
- “沙漏形状”算法题
- 希尔排序---for循环步长大于1时候的终止条件有问题
- 正则表达式入门之重复匹配
- mybatis编程整理
- HDU 6124-Euler theorem
- Docker安装Jenkins
- 2017.8模拟赛7 比赛笔记
- hdu 6109 数据分割(并查集+set合并)
- HDU 6130-Kolakoski(Kolakoski序列)
- 仿qq空间标题变色和仿知乎列表滑动隐藏和显示效果
- MOOC清华《面向对象程序设计》第2章:函数重载实验
- 普元 EOS Platform 7.6 coframe给用户授权了系统管理员的角色,登录后点击“启动流程”菜单,看不到可以启动的流程定义
- 多线程查找文件