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. ubuntu16.04安装最新版docker、docker-compose、docker-machine

    安装前说明: 本文将介绍在ubuntu16.04系统下安装和升级docker.docker-compose.docker-machine. docker:有两个版本:docker-ce(社区版)和do ...

  2. 「LOJ2000~2023」各省省选题选做

    「LOJ2000~2023」各省省选题选做 「SDOI2017」数字表格 莫比乌斯反演. 「SDOI2017」树点涂色 咕咕咕. 「SDOI2017」序列计数 多项式快速幂. 我们将超过 \(p\) ...

  3. XCode 设置自定义环境变量

    XCode 设置自定义环境变量 Product -> Scheme -> Edit Scheme -> 之后设置环境变量.

  4. [CocoaPods]Podfile文件

    Podfile是一个描述一个或多个Xcode项目的目标依赖项的规范.该文件应该只是命名Podfile.指南中的所有示例都基于CocoaPods 1.0及更高版本. Podfile可以非常简单,这会将A ...

  5. Zabbix-3-自定义脚本获取数据

    通过在agent中加入脚本,来获取数据,生成图形

  6. xtrabackup备份mysql-3 差异备份

    差异备份的特点是 基准点  指向第一次全备

  7. 昕有灵犀-xyFS私有文件云存储OSS服务

    本工程为本人开发的开源项目,地址: https://gitee.com/475660/xyFS 介绍: 一站式企业私有文件服务.针对软件开发时提供的文件存储系统,对文件上传.下载.分类.分组.审计.统 ...

  8. JavaScript中继承的那些事

    引言 JS是一门面向对象的语言,但是在JS中没有引入类的概念,之前特别疑惑在JS中继承的机制到底是怎样的,一直学了JS的继承这块后才恍然大悟,遂记之. 假如现在有一个“人类”的构造函数: functi ...

  9. HDU 4570---Multi-bit Trie(区间DP)

    题目链接 Problem Description IP lookup is one of the key functions of routers for packets forwarding and ...

  10. Unity 多人网络连接

    NetWorkServer.cs using UnityEngine; using System.Collections; public class NetWorkServer : MonoBehav ...