ICPC-数论:欧拉函数φ
文章平均质量分 75
数论中有关欧拉函数φ的题解
海岛Blog
专注于程序设计及其竞赛,专注于集成电路EDA设计
展开
-
UVA11424 GCD - Extreme (I)【欧拉函数打表】
Given the value of N, you will have to find the value of G. The definition of G is given below:G=∑i=1i<N∑j=i+1j≤NGCD(i,j)G =\sum_{i=1}^{i<N}\sum_{j=i+1}^{j≤N}GCD(i, j)G=i=1∑i<Nj=i+1∑j≤NGCD(i,j) Here GCD(i, j) means the g原创 2021-04-10 11:50:38 · 196 阅读 · 0 评论 -
UVA11327 Enumerating Rational Numbers【欧拉函数打表】
Consider the following method of enumerating all rational numbers between 0 and 1 (inclusively).for d = 1 to infinity do for n = 0 to d do if gcd(n,d) = 1 then print n/dwhere gcd(n, d) is the greatest common divisor of n and d. &nbs原创 2021-04-10 00:24:24 · 246 阅读 · 0 评论 -
UVA10990 Another New Function【欧拉函数打表】
The depth of phi value of a number is denoted by the number of steps required before it reaches 1. An example will make it very clear.ϕ(13) = 12 . . . step1ϕ(12) = 4 . . . step2ϕ(4) = 2 . . . step3ϕ(2) = 1 . . . step1 So the dep原创 2021-04-09 23:01:16 · 201 阅读 · 0 评论 -
HDU6322 Problem D. Euler Function【欧拉函数+数学规律】
Problem D. Euler FunctionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 1960 Accepted Submission(s): 1567Problem DescriptionIn number theory, Euler’s totient function φ(n) counts the positiv原创 2021-02-22 05:54:26 · 241 阅读 · 0 评论 -
HDU1286 找新朋友【欧拉函数】
找新朋友Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 19060 Accepted Submission(s): 10131Problem Description新年快到了,“猪头帮协会”准备搞一个聚会,已经知道现有会员N人,把会员从1到N编号,其中会长的号码是N号,凡是和会长是老朋友的,那么该会员的号码肯定和N有大于1的公约数,否则原创 2021-02-21 21:42:05 · 344 阅读 · 0 评论 -
HDU1787 GCD Again【欧拉函数】
GCD AgainTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5927 Accepted Submission(s): 2749Problem DescriptionDo you have spent some time to think and try to solve those unsolved problem after o原创 2021-02-21 21:26:47 · 210 阅读 · 1 评论 -
HDU2824 The Euler function【欧拉函数打表】
The Euler functionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13612 Accepted Submission(s): 5384Problem DescriptionThe Euler function phi is an important kind of function in number theory,原创 2021-02-21 18:02:03 · 253 阅读 · 0 评论 -
POJ2478 Farey Sequence【欧拉函数】
Farey SequenceTime Limit:1000MS Memory Limit:65536K Total Submissions:18635 Accepted:7495 DescriptionThe Farey Sequence Fn for any integer n with n >= 2 is the set of ir...原创 2018-07-22 18:05:33 · 478 阅读 · 0 评论 -
POJ1284 Primitive Roots【原根】
Primitive RootsTime Limit:1000MSMemory Limit:10000KTotal Submissions:4361Accepted:2568DescriptionWe say that integer x, 0 imod p) | 1 <= i <= p-1 } is equa原创 2017-07-27 22:06:34 · 1061 阅读 · 0 评论 -
UVA12493 Stars【欧拉函数】
Fernando won a compass for his birthday, and now his favorite hobby is drawing stars: first, he marks N points on a circumference, dividing it into N equal arcs; then, he connects each point to the kth next point, until returning to the first point.原创 2021-02-21 17:12:40 · 192 阅读 · 0 评论 -
UVA11426 GCD - Extreme (II)【欧拉函数】
Given the value of N, you will have to find the value of G. The definition of G is given below:G=∑i=1i<N∑j=i+1i≤NGCD(i,j)G =\sum_{i=1}^{i<N}\sum_{j=i+1}^{i≤N}GCD(i, j)G=i=1∑i<Nj=i+1∑i≤NGCD(i,j) Here GCD(i, j) means the g原创 2021-02-21 16:19:13 · 241 阅读 · 0 评论 -
UVA10820 Send a Table【欧拉函数打表】
When participating in programming contests, you sometimes face the following problem: You know how to calcutale the output for the given input values, but your algorithm is way too slow to ever pass the time limit. However hard you try, you just can’t disc原创 2021-02-21 15:43:32 · 224 阅读 · 0 评论 -
POJ3090 ZOJ2777 UVALive3571 Visible Lattice Points【欧拉函数】
Visible Lattice PointsTime Limit:1000MS Memory Limit:65536K Total Submissions:8207 Accepted:5041 DescriptionA lattice point (x,y) in the first quadrant (xandyare intege...原创 2018-07-22 10:06:18 · 430 阅读 · 0 评论 -
HDU2588 GCD【欧拉函数】
GCDTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5184 Accepted Submission(s): 2790Problem DescriptionThe greatest common divisor GCD(a,b) of two positive integers a and b,sometimes written (a原创 2021-02-04 00:30:41 · 273 阅读 · 0 评论 -
POJ2407 ZOJ1906 UVA10229 Relatives【欧拉函数+数论】
RelativesTime Limit:1000MSMemory Limit:65536KTotal Submissions:15625Accepted:7932DescriptionGiven n, a positive integer, how many positive integers less than n are relatively prime to n? Two int...原创 2018-02-19 17:27:03 · 520 阅读 · 0 评论 -
HDU4983 Goffi and GCD【欧拉函数】
Goffi and GCDTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1976 Accepted Submission(s): 697Problem DescriptionGoffi is doing his math homework and he finds an equality on his text book: gcd(n原创 2021-02-04 00:16:09 · 295 阅读 · 0 评论 -
UVA11417 GCD【GCD+欧拉函数】
Given the value of N, you will have to find the value of G. The definition of G is given below: Here GCD(i, j) means the greatest common divisor of integer i and integer j.&n...原创 2019-03-23 08:08:41 · 442 阅读 · 0 评论