直接打表找规律

HazelFan is given two positive integers a,ba,b, and he wants to calculate amodbamodb. But now he forgets the value of bb and only remember the value of aa, please tell him the number of different possible results.

InputThe first line contains a positive integer T(1≤T≤5)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)a(1≤a≤109).OutputFor each test case: 
A single line contains a nonnegative integer, denoting the answer. 
Sample Input

2
1
3

Sample Output

2
3
#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<sstream>
#include<algorithm>
#include<queue>
#include<deque>
#include<iomanip>
#include<vector>
#include<cmath>
#include<map>
#include<stack>
#include<set>
#include<memory>
#include<list>
#include<string>
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
#define MAXN 1009
#define L 31
#define INF 1000000009
#define eps 0.00000001 LL n;
int main()
{
int T;
scanf("%d", &T);
while (T--)
{
scanf("%lld", &n);
if (n & )
n++;
printf("%lld\n", n / + );
}
}

B - Euler theorem 数学的更多相关文章

  1. HDU 6124 Euler theorem

    Euler theorem 思路:找规律 a       余数                  个数 1       0 1                     2 2       0 2   ...

  2. 数学--数论--HDU - 6124 Euler theorem (打表找规律)

    HazelFan is given two positive integers a,b, and he wants to calculate amodb. But now he forgets the ...

  3. HDU 6124 17多校7 Euler theorem(简单思维题)

    Problem Description HazelFan is given two positive integers a,b, and he wants to calculate amodb. Bu ...

  4. 2017 beijing icpc A - Euler theorem

    2017-09-22 21:59:43 writer:pprp HazelFan is given two positive integers a,ba,b, and he wants to calc ...

  5. 【2017 Multi-University Training Contest - Team 7】 Euler theorem

    [Link]:http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1005&cid=765 [Description] 问你a ...

  6. 2017杭电多校第七场1005Euler theorem

    Euler theorem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others) ...

  7. RSA算法原理与加密解密 求私钥等价求求模反元素 等价于分解出2个质数 (r*X+1)%[(p-1)(q-1)]=0

    Rsapaper.pdf http://people.csail.mit.edu/rivest/Rsapaper.pdf [概述Abstract 1.将字符串按照双方约定的规则转化为小于n的正整数m, ...

  8. HDU6124

    Euler theorem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)T ...

  9. 2017 Multi-University Training Contest - Team 7

    HDU6121 Build a tree 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6121 题目意思:一棵 n 个点的完全 k 叉树,结点标号从 ...

随机推荐

  1. c#拖拽文件

    在“属性”窗口中,先设置MDI的父窗口的AllowDrop 属性更改为true;2.在父窗口的事件中添加下面两个事件 private void Form1_DragEnter(object sende ...

  2. Docker安装jenkins(六)

    这里是在linux环境下安装docker之后,在doucer内安装jenkins --------------------docker 安装 jenkins---------------------- ...

  3. 平衡图片负载,提升web站点访问体验

    最近给分公司做官方网站,内网测试一切ok,发布至云端后,体验惊人——公司外网网速渣渣(十几k~几十k),更加要命的是,网站的高清图,根本就加载不出来,几秒,十几秒过去了,仍然在转圈圈,如下图... 于 ...

  4. 2.3点击菜单显示div再点击就隐藏

    事件:onclick 属性:display 利用if语句实现 <!DOCTYPE html><html><head><meta charset="u ...

  5. javscript 导出html中的table到excel

    <script language="JavaScript" type="text/javascript"> /* * 默认转换实现函数,如果需要其他 ...

  6. 重构26-Remove Double Negative(去掉双重否定)

    尽管我在很多代码中发现了这种严重降低可读性并往往传达错误意图的坏味道,但这种重构本身还是很容易实现的.这种毁灭性的代码所基于的假设导致了错误的代码编写习惯,并最终导致bug.如下例所示: public ...

  7. 设计模式之一:strategy pattern

    定义算法族,彼此之间可以替换.变化的方法抽出封装,不变的父类定义继承.多用组合少用继承. 代码示例先不贴了.

  8. 物联网初学者智能家居必备迅为iTOP-4412开发板

    更情点击了解:http://www.topeetboard.com 1.  手把手全视频教程: 第一部分:迅为电子开发板入门视频 第二部分:Linux系统编程 第三部分:Itop-4412开发板硬件设 ...

  9. log4net小记

    log4net添加: Install-Package Log4net log4net.config配置: <?xml version="1.0" encoding=" ...

  10. android ListView几个比较特别的属性

    由于这两天在做listView的东西,所以整理出来一些我个人认为比较特别的属性,通过设置这样的属性可以做出更加美观的列表 首先是stackFromBottom属性,这只该属性之后你做好的列表就会显示你 ...