【HDOJ6322】Euler Function(数论)
题意:

思路:



#include <stdio.h>
#include <vector>
#include <algorithm>
#include <string.h>
#include <limits.h>
#include <string>
#include <iostream>
#include <queue>
#include <math.h>
#include <stack>
#include <map>
#define left (now<<1)
#define right ((now<<1)+1)
#define mid ((l+r)>>1)
using namespace std;
typedef long long int lint; const int MAXN = 1e5 + ; int t,n; int main(){
scanf("%d",&t);
while(t--){
scanf("%d",&n);
if(n == ){ printf("5\n"); continue;}
printf("%d\n",n + );
}
return ;
}
【HDOJ6322】Euler Function(数论)的更多相关文章
- The Euler function[HDU2824]
The Euler functionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)To ...
- hdu 2824 The Euler function
The Euler function Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Other ...
- The Euler function(欧拉函数)
The Euler function Time Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other) ...
- hdu 2824 The Euler function(欧拉函数)
题目链接:hdu 2824 The Euler function 题意: 让你求一段区间的欧拉函数值. 题解: 直接上板子. 推导过程: 定义:对于正整数n,φ(n)是小于或等于n的正整数中,与n互质 ...
- The Euler function(线性筛欧拉函数)
/* 题意:(n)表示小于n与n互质的数有多少个,给你两个数a,b让你计算a+(a+1)+(a+2)+......+b; 初步思路:暴力搞一下,打表 #放弃:打了十几分钟没打完 #改进:欧拉函数:具体 ...
- hdu 2824 The Euler function 欧拉函数打表
The Euler function Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Other ...
- HDU 2824 The Euler function --------欧拉模板
The Euler function Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Other ...
- hdu2824 The Euler function(欧拉函数个数)
版权声明:本文为博主原创文章,未经博主同意不得转载. vasttian https://blog.csdn.net/u012860063/article/details/36426357 题目链接:h ...
- HDUOJ-----2824The Euler function
The Euler function Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Other ...
- HDU 6322.Problem D. Euler Function -欧拉函数水题(假的数论题 ̄▽ ̄) (2018 Multi-University Training Contest 3 1004)
6322.Problem D. Euler Function 题意就是找欧拉函数为合数的第n个数是什么. 欧拉函数从1到50打个表,发现规律,然后勇敢的水一下就过了. 官方题解: 代码: //1004 ...
随机推荐
- 让jquery.tmpl支持序号${index}
参考 http://blog.csdn.net/wangji5850/article/details/50913121 压缩的查找第一个map,添加 jQuery.map( h, function( ...
- f# mathprovider
http://mathprovider.codeplex.com/ http://mathnetnumerics.codeplex.com/releases/view/110750 http://py ...
- var、符号运算、条件语句、三元(目)运算、自加和自减
1.var a=“hello world” a 这个变量是字符串了,对于里面的每一个字母来说,他是字节,里面有11个字节,(包括空格),字节总数用length表示 2.符号运算 + 字符串拼接 . ...
- 浏览器的差距、ie6 ie7 ie8、符号、html css、BFC、
1.浏览器的差距 浏览器默认的字体是16px,谷歌的最小字体是12px,其他是10px 2.ie6.ie7.ie8. hack:就是针对不同的浏览器去不同的html,css样式,从而让各个浏览器能达到 ...
- IDEA下MyBatis错误总结
1. Pom.xml配置 语法顺序 <properties resource="config.properties"> </properties> < ...
- IE8提速经验
给人写了个web程序,其中detail页要加载不少东西,所以耗时略长.因为bootstrap的原因,我要求用户使用chrome; 而chrome出了名的快,所以也基本没觉得什么. 后来用户因为别的原因 ...
- 解决python pip安装提示"not a supported wheel on this platform"
python下载.whl安装文件后使用pip安装有时候会提示报错"xxxxx not a supported wheel on this platform",应该是下载的库文件版本 ...
- dropdb - 删除一个现有 PostgreSQL 数据库
SYNOPSIS dropdb [ option...] dbname DESCRIPTION 描述 dropdb 删除一个现有 PostgreSQL 数据库. 执行这条命令的人必须是数据库超级用户, ...
- 【转】解决WPF图片模糊最佳方法(绑定PixelWidth与PixelHeight)
解决WPF图片模糊最佳方法(绑定PixelWidth与PixelHeight) 转载自:http://www.360doc.com/content/13/1126/09/10504424_332211 ...
- Maven实战读书笔记(一):Maven概述
1.1 Maven是什么,能做什么 Maven是一个跨平台的项目管理工具,主要服务于Java平台的项目构建.依赖管理和项目信息管理. Maven的用途之一是项目构建,能够自动化构建过程,从清理.编译. ...