hdu 5430
来源:互联网 发布:佛山顺德区网络推广 编辑:程序博客网 时间:2024/05/22 06:11
hdu 5430 http://acm.hdu.edu.cn/showproblem.php?pid=5430
#include <iostream>#include <cstdio>#include <string>#include <vector>#include <map>#include <stack>#include <queue>#include <cmath>#include <cstdlib>#include <cstring>#include <algorithm>using namespace std;int gcd(int x,int y){return !y?x:gcd(y,x%y);}int main(){int t;cin>>t;while(t--){int n;cin>>n;int cnt=1;for(int i=2;i<=n+1;++i){if(gcd(i,n+1)==1) ++cnt;}cout<<cnt<<endl;}return 0;}
0 0
- hdu-5430
- hdu 5430
- HDU 5430 Reflect
- HDU 5430 Reflect
- hdu 5430(几何)
- hdu 5430 Reflect(数论)
- hdu
- hdu
- HDU
- hdu ()
- hdu
- hdu
- HDU
- HDU
- hdu
- hdu
- HDU
- Hdu
- 0906学习记录
- CSS从图标集里截取某一图标
- bzoj3669
- 标题:利用动态规划求解最优二叉树
- unity之射线
- hdu 5430
- BP神经网络 MATLAB源程序
- iOS开发问题之unacceptable content-type: text/html}
- cin、cin.get()、cin.getline()、getline()、gets()等函数的用法
- testlink的步骤
- hdu 4722 Good Numbers(找规律,记忆化搜索,数位dp)
- Xcode引入外界文件时选Create groups 或 Create folder references的区别
- 实现官方下拉刷新,增加自动加载更多
- 爬图书馆电子资源