欧拉函数
文章平均质量分 54
ctsas
这个作者很懒,什么都没留下…
展开
-
GCD - Extreme (II) [欧拉函数]
G=0;for(i=1;i<N;i++) for(j=i+1;j<=N;j++) { G+=gcd(i,j); }/*Here gcd() is a function that findsthe greatest common divisor of the twoinput numbers*/InputThe input file contains a原创 2017-02-17 15:11:00 · 548 阅读 · 0 评论 -
[HDU]1286 找新朋友 [欧拉函数]
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=1286Problem Description 新年快到了,“猪头帮协会”准备搞一个聚会,已经知道现有会员N人,把会员从1到N编号,其中会长的号码是N号,凡是和会长是老朋友的,那么该会员的号码肯定和N有大于1的公约数,否则都是新朋友,现在会长想知道究竟有几个新朋友?请你编程序帮会长计算出来。Input原创 2017-02-17 21:11:22 · 299 阅读 · 0 评论 -
[HDU]2848 The Euler function[欧拉函数][水题]
Problem Description The Euler function phi is an important kind of function in number theory, (n) represents the amount of the numbers which are smaller than n and coprime to n, and this function has原创 2017-02-17 21:19:28 · 416 阅读 · 0 评论 -
[HDU]3501 Calculation 2 [欧拉函数之求和]
Problem Description Given a positive integer N, your task is to calculate the sum of the positive integers less than N which are not coprime to N. A is said to be coprime to B if A, B share no common原创 2017-02-17 21:54:14 · 439 阅读 · 0 评论 -
欧拉函数
在数论中,对正整数n,欧拉函数φ(n) 是小于或等于n的正整数中与n互质的数的数目。此函数以其首名研究者欧拉命名,它又称为φ函数(由高斯所命名)或是欧拉总计函数(totient function,由西尔维斯特所命名)。下面的内容转自 http://blog.csdn.net/wyg1997/article/details/50510633 求解与n(1~n-1)互质的质因子的个数解析:(转) 定转载 2017-02-11 20:03:48 · 860 阅读 · 0 评论 -
[HDU]1695-GCD [容斥][欧拉函数]
Problem DescriptionGiven 5 integers: a, b, c, d, k, you’re to find x in a…b, y in c…d that GCD(x, y) = k. GCD(x, y) means the greatest common divisor of x and y. Since the number of choices may be very原创 2017-02-12 15:31:53 · 320 阅读 · 0 评论 -
Bi-shoe and Phi-shoe [欧拉函数][贪心]
Bamboo Pole-vault is a massively popular sport in Xzhiland. And Master Phi-shoe is a very popular coach for his success. He needs some bamboos for his students, so he asked his assistant Bi-Shoe to go原创 2017-02-15 15:39:15 · 443 阅读 · 0 评论 -
线筛欧拉函数
Description The Euler function phi is an important kind of function in number theory, (n) represents the amount of the numbers which are smaller than n and coprime to n, and this function has a lot of原创 2017-03-07 18:07:22 · 336 阅读 · 0 评论