Euler theorem

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)
Total Submission(s): 742    Accepted Submission(s): 584

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 integer a(1≤a≤109).
 

Output

For each test case:
A single line contains a nonnegative integer, denoting the answer.
 

Sample Input

2
1
3
 

Sample Output

2
3
 

Source

 
 //2017-09-22
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#define ll long long using namespace std; int main()
{
int T;
ll n;
cin>>T;
while(T--){
cin>>n;
if(n == )cout<<<<endl;
else if(n&)cout<<n/+<<endl;
else cout<<n/+<<endl;
} return ;
}

HDU6124的更多相关文章

  1. C语言中的模运算-hdu6124(打表,找规律)

    题目链接:https://vjudge.net/problem/HDU-6124 题目描述: 题目大意就是给你一个数,判断这个数 % 其它数后共有几种结果. 这题对我来说最大的难点是我不太知道每个数 ...

  2. 2017 Multi-University Training Contest - Team 7

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

随机推荐

  1. 项目Alpha冲刺(团队1/10)

    项目Alpha冲刺(团队1/10) 团队名称: 云打印 作业要求: 项目Alpha冲刺(团队) 作业目标: 完成项目Alpha版本 团队队员 队员学号 队员姓名 个人博客地址 备注 221600412 ...

  2. 机器学习&深度学习之路

    计划最近好好按步骤按阶段系统性的学习下机器学习和深度学习,希望能坚持下去. 2019-01-05 基于TensorFlow的深度学习系列教程 2--常量Constant 2019-01-03 深度学习 ...

  3. Redis 客户端命令总结

    注意:括号里是参数,具体使用的时候不需要括号和逗号,直接使用空格分隔命令以及各个参数即可. 1.对Key操作的命令 exists(key):确认一个key是否存在.存在返回1,不存在返回0. del( ...

  4. Python函数学习——初步认识

    函数使用背景 假设老板让你写一个监控程序,24小时全年无休的监控你们公司网站服务器的系统状况, 当cpu\memory\disk等指标的使用量超过阀值时即发邮件报警, 你掏空了所有的知识量,写出了以下 ...

  5. c++编程之内存的分配

    当我们在进行编程时,特别是使用c++语言进行编程时,需要知道内存有几个内存区可供我们使用,因为c++可以直接操作内存.接下让我们来看看内存中的几大内存区. 1.栈区 栈区(stack)是速度最快的一个 ...

  6. 关于c++11中的thread库

    c++11中新支持了thread这个库,常见的创建线程.join.detach都能支持. join是在main函数中等待线程执行完才继续执行main函数,detach则是把该线程分离出来,不管这个线程 ...

  7. centos下如何使用sendmail发送邮件

    最近在实施服务端日志监控脚本,需要对异常情况发送邮件通知相关责任人,记录下centos通过sendmail发送邮件的配置过程. 一.安装sendmail与mail 1.安装sendmail:  1) ...

  8. mysql 开发进阶篇系列 27 数据库字符集设置

    在安装完数据库后,使用汉字插入到表中,会报错,需要修改字符集类型,如下图所示: -- 插入汉字时报错 INSERT INTO User2 VALUES('张三') -- 查看字符集 SHOW VARI ...

  9. Android快速实现二维码扫描--Zbar

    Android中二维码扫描的最常用库是zxing和zbar,上一篇<Android快速实现二维码扫描–Zxing>介绍了Zxing.这次说Zbar,Zbar速度极快,我就比较常用,项目地址 ...

  10. Hashtable,HashMap,TreeMap有什么区别?Vector,ArrayList,LinkedList有什么区别?int和Integer有什么区别?

    接着上篇继续更新. /*请尊重作者劳动成果,转载请标明原文链接:*/ /*https://www.cnblogs.com/jpcflyer/p/10759447.html* / 题目一:Hashtab ...