HDU 6124 Euler theorem【】
来源:互联网 发布:用工作站玩游戏知乎 编辑:程序博客网 时间:2024/05/17 21:43
Euler theorem
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 292 Accepted Submission(s): 244
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
213
Sample Output
23
Source
2017 Multi-University Training Contest - Team 7
#include<iostream>#include<cstdio>#include<cstring>#include<string>#include<cmath>#include<queue>#include<stack>#include<vector>#include<map>#include<set>#include<algorithm>using namespace std;#define ll long long#define ms(a,b) memset(a,b,sizeof(a))const int M=1e5+10;const int MM=2e3+10;const int inf=0x3f3f3f3f;const int mod=1e9+7;;const double eps=1e-8;int n,m;int main(){ int t; scanf("%d",&t); while(t--){ scanf("%d",&n); printf("%d\n",(n-1)/2+2); } 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
- 在Updata中的continue,断点调试结果与运行结果不一样
- 小米的疯狂进化论
- 文章标题
- Lweb and String(set)
- 和μCOS走完一生
- HDU 6124 Euler theorem【】
- HDU
- Python 成长之路
- 全连接层的作用
- [python3.6 flask web学习]Flask用户权限管理
- Android7.0应用程序自助更新跳转安装界面出现解析包出错
- Android 简单的点击震动
- 关于在JetBrains WebStorm 2017.2 x64上配置本地服务器(apache)
- Android 7.0 PopupWindow 的showAsDropDown(View v)适配