杭电暑期多校集训—Euler theorem
来源:互联网 发布:石头人升级数据 编辑:程序博客网 时间:2024/06/04 19:50
Euler theorem
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找规律-。-#include<iostream>#include<cstdio>#include<cstring>using namespace std;int main(){ long long int a,b,c,d,e,f; cin>>a; while(a--) { cin>>b; d=(b-1)/2+2; cout<<d<<endl; } return 0;}
阅读全文
0 0
- 杭电暑期多校集训—Euler theorem
- 杭电 Euler theorem
- 杭电暑期多校集训—KazaQ's Socks
- 杭电暑期多校集训—Maximum Sequence
- 杭电暑期多校集训—Is Derek lying?
- 杭电暑期多校集训—Regular polygon
- 杭电暑期多校集训—RXD and math
- 杭电暑期多校集训—RXD's date
- 杭电暑期多校集训—Questionnaire
- 杭电暑期多校集训—RXD and dividing
- 杭电暑期多校集训—Kolakoski
- 杭电暑期多校集训— hard challenge
- 杭电暑期多校集训—Killer Names
- 2009ACM多校联合暑期集训(4)——杭电专场
- 杭电暑期多校集训—Time To Get Up
- 杭电暑期集训-Add More Zero
- hdu6124 Euler theorem -多校联盟7
- hdu 6124 Euler theorem (多校联赛)
- 在PDF文档中添加附件需要我们如何去进行操作
- JVM TLAB与GC测试
- spring中的ReflectionUtils类
- LAmbda表达式 C#版
- Echarts数据可视化开发参数配置全解
- 杭电暑期多校集训—Euler theorem
- node embedding
- 常见的信号平滑处理方法
- Java知识(多态和引用类型转换)
- Linux 获取设备树源文件(DTS)里的资源
- Windows下进行Django开发
- 《转》怎样在latex中插入jpg图片
- (0062)iOS开发之Xcode自带单元测试UnitTest
- HDU 6124 Euler theorem