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
 
题意:有两个正整数a,b。a已知,b未知,求a mod b有几种情况
题解:手算几个即可发现规律。以7为例,有如下5种情况 7(b>7),1(b==6||b==3||b==2),2(b==5),3(b==4),0(b==1||b==7);
 #include<iostream>
#include<cstdio>
using namespace std; int T;
long long a;
int main()
{
scanf("%d",&T);
while(T--)
{
scanf("%lld",&a);
printf("%lld\n",(a+)/+);
}
return ;
}

HDU 6124 17多校7 Euler theorem(简单思维题)的更多相关文章

  1. HDU 6140 17多校8 Hybrid Crystals(思维题)

    题目传送: Hybrid Crystals Problem Description > Kyber crystals, also called the living crystal or sim ...

  2. HDU 6034 17多校1 Balala Power!(思维 排序)

    Problem Description Talented Mr.Tang has n strings consisting of only lower case characters. He want ...

  3. 2019浙大校赛--G--Postman(简单思维题)

    一个思维水题 题目大意为,一个邮递员要投递N封信,一次从邮局来回只能投递K封.求最短的投递总距离.需注意,最后一次投递后无需返回邮局. 本题思路要点: 1.最后一次投递无需返回邮局,故最后一次投递所行 ...

  4. HDU 6143 17多校8 Killer Names(组合数学)

    题目传送:Killer Names Problem Description > Galen Marek, codenamed Starkiller, was a male Human appre ...

  5. HDU 6045 17多校2 Is Derek lying?

    题目传送:http://acm.hdu.edu.cn/showproblem.php?pid=6045 Time Limit: 3000/1000 MS (Java/Others)    Memory ...

  6. HDU 3130 17多校7 Kolakoski(思维简单)

    Problem Description This is Kolakosiki sequence: 1,2,2,1,1,2,1,2,2,1,2,2,1,1,2,1,1,2,2,1……. This seq ...

  7. HDU 6038 17多校1 Function(找循环节/环)

    Problem Description You are given a permutation a from 0 to n−1 and a permutation b from 0 to m−1. D ...

  8. HDU 6103 17多校6 Kirinriki(双指针维护)

    Problem Description We define the distance of two strings A and B with same length n isdisA,B=∑i=0n− ...

  9. HDU 6098 17多校6 Inversion(思维+优化)

    Problem Description Give an array A, the index starts from 1.Now we want to know Bi=maxi∤jAj , i≥2. ...

随机推荐

  1. 托管DLL和非托管DLL的区别

    首先解释一下,托管DLL和非托管DLL的区别.狭义解释讲,托管DLL就在Dotnet环境生成的DLL文件.非托管DLL不是在Dotnet环 境生成的DLL文件. 托管DLL文件,可以在Dotnet环境 ...

  2. 函数使用五:MIR7 发票预制 BAPI_INCOMINGINVOICE_PARK

    引自:http://blog.csdn.net/champaignwolf/article/details/51422329 FUNCTION zincominginvoice_park. *&quo ...

  3. WDA基础六:字段,表等visiable,enable,read_only控制

    今天主要讲一下布局控制:(visiable,enable,read_only) visiable:可见性,控制字段,组件,分组等是否现实在界面上.一般按条件来控制隐藏的可以在CONTEXT NODE里 ...

  4. hibernate建表默认为UTF-8编码

    一.问题: hibernate自动建表的编码应该是数据默认的编码格式,一般也不是utf-8.所以想要建表默认的编码是UTF-8,应该怎么做呢? 二.解决方法: 拿mysql举例: (一).修改hibe ...

  5. Nodejs--url模块

    由于GET请求直接被嵌入在路径中,URL是完整的请求路径,包括了?后面的部分,因此你可以手动解析后面的内容作为GET请求的参数. url 模块中的 parse 函数可以用于解析url中的参数. url ...

  6. 【Python】基础知识

    一.基本概念 1.变量与运算符 Python允许给多个变量同时赋值,等号 (=) 右边的值将赋予左边对应位置的变量. # 将a, b, c的值依次赋予b, c, a b, c, a = a, b, c ...

  7. 关于cf[转]

    还不怎么熟悉cf呢.. 你应当知道的关于Codeforces的事情 Codeforces简称: cf(所以谈论cf的时候经常被误会成TX的那款游戏).网址: codeforces.com 这是一个俄国 ...

  8. 专题[vjudge] - 数论0.1

    专题[vjudge] - 数论0.1 web-address : https://cn.vjudge.net/contest/176171 A - Mathematically Hard 题意就是定义 ...

  9. linux下find命令详解

    Linux中find常见用法示例 ·find   path   -option   [   -print ]   [ -exec   -ok   command ]   {} \; find命令的参数 ...

  10. Vue + Element UI 实现权限管理系统(工具模块封装)

    封装 axios 模块 封装背景 使用axios发起一个请求是比较简单的事情,但是axios没有进行封装复用,项目越来越大,会引起越来越多的代码冗余,让代码变得越来越难维护.所以我们在这里先对 axi ...