直接打表找规律

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. 2017广东工业大学程序设计竞赛决赛 H tmk买礼物

    题意: Description 今天是校赛的日子,为了庆祝这么喜庆的日子,TMK打算买些礼物给女票LSH庆祝一下. TMK进入了雪梨超市,然后刚踏入的一瞬间,店主就对TMK说:“恭喜你成为了本店第21 ...

  2. Spark学习之Spark Streaming(9)

    Spark学习之Spark Streaming(9) 1. Spark Streaming允许用户使用一套和批处理非常接近的API来编写流式计算应用,这就可以大量重用批处理应用的技术甚至代码. 2. ...

  3. git创建分支及日常使用

    克隆代码 git clone https://github.com/master-dev.git 查看所有分支 git branch --all # 默认只有master分支,所以会看到如下两个分支 ...

  4. html中 accept 属性

    1.HTML <input> 标签的 accept 属性 在文件上传中使用 accept 属性,本例中的输入字段可以接受 GIF 和 JPEG 两种图像: <form> < ...

  5. JavaScript——responseType

    https://www.cnblogs.com/cdemo/p/5225848.html https://blog.csdn.net/wkyseo/article/details/78232485 异 ...

  6. 理清楚HTML和DHTML和XML的概念

    DHTML 不是 W3C 标准DHTML 指动态 HTML(Dynamic HTML).DHTML 不是由万维网联盟(W3C)规定的标准.DHTML 是一个营销术语 - 被网景公司(Netscape) ...

  7. 浮动qq客服备份代码

    <div class="main-im"> <div id="open_im" class="open-im"> & ...

  8. 6-Java-C(移动距离)

    题目描述: X星球居民小区的楼房全是一样的,并且按矩阵样式排列.其楼房的编号为1,2,3... 当排满一行时,从下一行相邻的楼往反方向排号. 比如:当小区排号宽度为6时,开始情形如下: 1  2  3 ...

  9. bdflush - 将dirty缓存写回到磁盘的核心守护进程

    总览(SYNOPSIS) bdflush [opt] 描述(DESCRIPTION) bdflush 被用来启动核心守护进程将内存中的dirty缓存写到磁盘上.真正清洁工作是一个核心程序完成的. bd ...

  10. adb 设备命令

    一.adb 设备命令1.查看机型时,可以使用以下命令$ adb shell getprop ro.product.model 2.如果我们忘记具体系统属性的名字$ adb shell getprop ...