直接打表找规律

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. SQL Server调试存储过程

      一.   调试SQL   Server   2000 1.   设置帐户. <1>   在windows服务中找到MSSQLSERVER,双击弹出对话框. <2>   选择 ...

  2. ERROR 1 (HY000): Can't create/write to file '/tmp/#sql_830_0.MYI' (Errcode: 13)

    mysql操作时,出现报错. 执行describe 命令时, 临时文件目录没有创建或者无写入权限:于是: cd /var/lib/mysql/ #进入mysql数据目录 mkdir tmp #创建需要 ...

  3. python学习(day2)

    1.常用数据类型及内置方法 1.列表(list) 定义:在中括号[]内存放任意多个值,用逗号隔开. 具体函数和内置方法如下: #定义学生列表,可存放多个学生 students=['a','b','c' ...

  4. VUE scoped css 局部css内嵌样式方法 >>>

    <style scoped> .ivu-carousel >>> button { background-color: buttonface;} .demo-carous ...

  5. JavaScript 原生代码找对象的方法

    1. id :  document.getElementById('id') 2. 标签 : document.getElementsByTagName('标签') //获得的是一个标签数组 3. N ...

  6. winpcap编程设置过滤器之指定获取某个网站的数据

    下面,我将以 乱世隋唐页游 为例,通过编码获取这里面的数据. 游戏图: 我是乱世隋唐的网址是:www.917st.com 这个是官网网址的服务器地址.  42.62.0.14 我玩的游戏服是84区.网 ...

  7. CAD参数绘制直径标注(com接口)

    主要用到函数说明: _DMxDrawX::DrawDimDiametric 绘制一个直径标注.详细说明如下: 参数 说明 DOUBLE dChordPointX 在被标注的曲线上的第一个点X值 DOU ...

  8. android实战简易教程-链接

    http://blog.csdn.net/yayun0516/article/category/2799943

  9. (3)Gojs model简介

    (3)Gojs model简介 在GoJS中,model用来存储表的基本数据,包括node.link等具体对象和属性,与其在视觉上的展示效果不相关.model中往往只保存相对简单的数据,最方便且持久化 ...

  10. 原生j获取元素的几种方法

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...