随笔分类 - 数论 欧拉函数
摘要:Find the maximum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others) Problem Description Euler's Totient function, φ (n)
阅读全文
摘要:Mathematician QSC Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Problem Description QSC dream of becoming a mathe
阅读全文
摘要:A. Laptops time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output One day Dima and Alex had an a
阅读全文
摘要:2005: [Noi2010]能量采集 Description 栋栋有一块长方形的地,他在地上种了一种能量植物,这种植物可以采集太阳光的能量。在这些植物采集能量后, 栋栋再使用一个能量汇集机器把这些植物采集到的能量汇集到一起。 栋栋的植物种得非常整齐,一共有n列,每列 有m棵,植物的横竖间距都一样,
阅读全文
摘要:1363 最小公倍数之和 题目来源: SPOJ 基准时间限制:1.5 秒 空间限制:131072 KB 分值: 160 给出一个n,求1-n这n个数,同n的最小公倍数的和。例如:n = 6,1,2,3,4,5,6 同6的最小公倍数分别为6,6,6,12,30,6,加在一起 = 66。 由于结果很大,
阅读全文
摘要:Farey Sequence Time Limit: 1000MS Memory Limit: 65536K Description The Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible ratio
阅读全文
摘要:2705: [SDOI2012]Longge的问题 Description Longge的数学成绩非常好,并且他非常乐于挑战高难度的数学问题。现在问题来了:给定一个整数N,你需要求出∑gcd(i, N)(1<=i <=N)。 Longge的数学成绩非常好,并且他非常乐于挑战高难度的数学问题。现在问题
阅读全文
摘要:2190: [SDOI2008]仪仗队 Description 作为体育委员,C君负责这次运动会仪仗队的训练。仪仗队是由学生组成的N * N的方阵,为了保证队伍在行进中整齐划一,C君会跟在仪仗队的左后方,根据其视线所及的学生人数来判断队伍是否整齐(如下图)。 现在,C君希望你告诉他队伍整齐时能看到的
阅读全文
摘要:3884: 上帝与集合的正确用法 Description 根据一些书上的记载,上帝的一次失败的创世经历是这样的: 第一天, 上帝创造了一个世界的基本元素,称做“元”。 第二天, 上帝创造了一个新的元素,称作“α”。“α”被定义为“元”构成的集合。容易发现,一共有两种不同的“α”。 第三天, 上帝又创
阅读全文
摘要:Problem 1759 Super A^B mod C Time Limit: 1000 mSec Memory Limit : 32768 KB Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description Given A,B
阅读全文
摘要:D. Notepad time limit per test 2 seconds memory limit per test 64 megabytes input standard input output standard output D. Notepad time limit per test
阅读全文
摘要:2226: [Spoj 5971] LCMSum Description Given n, calculate the sum LCM(1,n) + LCM(2,n) + .. + LCM(n,n), where LCM(i,n) denotes the Least Common Multiple
阅读全文
摘要:2818: Gcd Description 给定整数N,求1<=x,y<=N且Gcd(x,y)为素数的数对(x,y)有多少对. 给定整数N,求1<=x,y<=N且Gcd(x,y)为素数的数对(x,y)有多少对. Input 一个整数N 一个整数N Output 如题 如题 Sample Input
阅读全文
摘要:1040 最大公约数之和 题目来源: rihkddd 基准时间限制:1 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 收藏 关注 1040 最大公约数之和 题目来源: rihkddd 基准时间限制:1 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 1040 最
阅读全文
摘要:GCD Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description The greatest common divisor GCD(a,b) of two p
阅读全文
摘要:Longge's problem Description Longge is good at mathematics and he likes to think about hard mathematical problems which will be solved by some gracefu
阅读全文
摘要:Calculation 2 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description Given a positive integer N, your ta
阅读全文
摘要:The Euler function Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description The Euler function phi is an i
阅读全文
摘要:找新朋友 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description 新年快到了,“猪头帮协会”准备搞一个聚会,已经知道现有会员N人,把会员从1到N编号,其中
阅读全文