HDU6124
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
Input
For each test case:
A single line contains a positive integer a(1≤a≤109).
Output
A single line contains a nonnegative integer, denoting the answer.
Sample Input
1
3
Sample Output
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的更多相关文章
- C语言中的模运算-hdu6124(打表,找规律)
题目链接:https://vjudge.net/problem/HDU-6124 题目描述: 题目大意就是给你一个数,判断这个数 % 其它数后共有几种结果. 这题对我来说最大的难点是我不太知道每个数 ...
- 2017 Multi-University Training Contest - Team 7
HDU6121 Build a tree 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6121 题目意思:一棵 n 个点的完全 k 叉树,结点标号从 ...
随机推荐
- Itween的代码使用方法 - 01
BB:Itween是真心不好用! - 透明度动画 void Start () { //键值对儿的形式保存iTween所用到的参数 Hashtable args = new Hashtable(); / ...
- 调用opencv相关函数,从视频流中提取出图片序列&&&&jpg图片序列,转化成avi格式视频
/************************ @HJ 2017/3/30 参考http://blog.sina.com.cn/s/blog_4b0020f301010qcz.html修改的代码 ...
- liunx----配置搜狗输入法
话不多说直接看步骤 * 系统版本: ubuntu 18.04.1 // 查看命令为: # cat /etc/issue 1. 先查看当前系统是否存在 fcitx 框架: # dpkg -l | gre ...
- js内存空间的那点事
由于js具有自动垃圾回收机制,导致接触js后一直没去关注js的内存分配及变量回收等原理,只是懵懂的了解用变量标记法(null)可以手动的去清除或是回收:是时候弥补这个大坑了... 垃圾回收两种方法 一 ...
- JavaScript中的定时事件
这两个函数都是在给定的时间之后开始执行的,并不是立即执行. var timeId = window.setTimeout("method()",1000); //定时执行,还可以这 ...
- 谷歌浏览器怎么FQ(一)(想使用谷歌浏览器应用商城的小伙伴这边看)
谷歌浏览器的应用商城里本身有很多不错的扩展程序和插件,比如Wappalyzer(能够识别某个网站用的什么框架和库)广告终结者(能屏蔽大部分浮动,弹窗,甚至视频广告)等 但是谷歌因为某些原因需要FQ以后 ...
- struts2框架学习笔记6:拦截器
拦截器是Struts2实现功能的核心部分 拦截器的创建: 第一种: package interceptor; import com.opensymphony.xwork2.ActionInvocati ...
- Difference Between Session.run and Tensor.eval
[Question]: TensorFlow has two ways to evaluate part of graph: Session.run on a list of variables an ...
- BitMap位图与海量数据的理解与应用
1. Bit Map算法简介 来自于<编程珠玑>.所谓的Bit-map就是用一个bit位来标记某个元素对应的Value, 而Key即是该元素.由于采用了Bit为单位来存储数据,因此在存储空 ...
- Ocelot 使用
官方文档:http://ocelot.readthedocs.io/en/latest/introduction/gettingstarted.html 新建两个Asp.net core API项目 ...