摘要:GCD and LCMTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 40Accepted Submission(s): 22Problem DescriptionGiven two positive integers G and L, could you tell me how many solutions of (x, y, z) there are, satisfying that gcd(x, y, z) = G and lcm(x,
阅读全文
摘要:GCDTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4272Accepted Submission(s): 1492Problem 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 an
阅读全文
摘要:Integer PartitionTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 22Accepted Submission(s): 15Problem DescriptionGiven n, k, calculate the number of different (unordered) partitions of n such that no part is repeated k or more times. InputFirst line
阅读全文
摘要:GCD AgainTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1997Accepted Submission(s): 772Problem DescriptionDo you have spent some time to think and try to solve those unsolved problem after one ACM contest?No? Oh, you must do this when you want to
阅读全文
摘要:InvokerTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 122768/62768 K (Java/Others)Total Submission(s): 907Accepted Submission(s): 364Problem DescriptionOn of Vance's favourite hero is Invoker, Kael. As many people knows Kael can control the elements and combine them to invoke a powerful ski
阅读全文
摘要:Prime DistanceTime Limit:1000MSMemory Limit:65536KTotal Submissions:9322Accepted:2531DescriptionThe branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number theoreticians for thousands of years is the question of primality.
阅读全文
摘要:小明系列故事——未知剩余系Time Limit: 500/200 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 594Accepted Submission(s): 123Problem Description “今有物不知其数,三三数之有二,五五数之有三,七七数之有二,问物几何?” 这个简单的谜题就是中国剩余定理的来历。 在艰难地弄懂了这个定理之后,小明开始设计一些复杂的同余方程组X mod ai = bi 来调戏别人,结果是必然的,都失败了。 可是在这个过程中,小明发现有时...
阅读全文
摘要:D_numTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2046Accepted Submission(s): 573Problem DescriptionOregon Maple was waiting for Bob When Bob go back home. Oregon Maple asks Bob a problem that as a Positive number N, if there are only four Posit
阅读全文
摘要:Max FactorTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2238Accepted Submission(s): 684Problem DescriptionTo improve the organization of his farm, Farmer John labels each of his N (1 <= N <= 5,000) cows with a distinct serial number in the
阅读全文
摘要:SumTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 358Accepted Submission(s): 109Problem DescriptionXXX is puzzled with the question below: 1, 2, 3, ..., n (1<=n<=400000) are placed in a line. There are m (1<=m<=1000) operations of two
阅读全文
摘要:Calculation 2Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1264Accepted Submission(s): 530Problem DescriptionGiven 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
阅读全文
摘要:F(N)Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2037Accepted Submission(s): 677Problem DescriptionGiving the N, can you tell me the answer of F(N)?InputEach test case contains a single integer N(1<=N<=10^9). The input is terminated by a s
阅读全文
摘要:完数Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11766Accepted Submission(s): 4082Problem Description完数的定义:如果一个大于1的正整数的所有因子之和等于它的本身,则称这个数是完数,比如6,28都是完数:6=1+2+3;28=1+2+4+7+14。本题的任务是判断两个正整数之间完数的个数。Input输入数据包含多行,第一行是一个正整数n,表示测试实例的个数,然后就是n个测试实例,每个实例占一
阅读全文
摘要:The time of a dayTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 742Accepted Submission(s): 327Problem DescriptionThere are no days and nights on byte island, so the residents here can hardly determine the length of a single day. Fortunately, they
阅读全文
摘要:Prime TestTime Limit: 6000MSMemory Limit: 65536KTotal Submissions: 24514Accepted: 5730Case Time Limit: 4000MSDescriptionGiven a big integer number, you are required to find out whether it's a prime number.InputThe first line contains the number of test cases T (1 <= T <= 20 ), then the fol
阅读全文
摘要:FactorialTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1699Accepted Submission(s): 1085Problem DescriptionThe most important part of a GSM network is so called Base Transceiver Station (BTS). These transceivers form the areas called cells (this t
阅读全文
摘要:A/BTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 639Accepted Submission(s): 517Problem Description要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。Input数据的第一行是一个T,表示有T组数据。每组数据有两个数n(0 <= n < 9973)和B(1 <= B <= 10^9)。O
阅读全文
摘要:SumdivTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 10071Accepted: 2357DescriptionConsider two natural numbers A and B. Let S be the sum of all natural divisors of A^B. Determine S modulo 9901 (the rest of the division of S by 9901).InputThe only line contains the two natural numbers A an
阅读全文
摘要:The number of divisors(约数) about Humble NumbersTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1623Accepted Submission(s): 789Problem DescriptionA number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5,
阅读全文
摘要:排列2Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2554Accepted Submission(s): 991Problem DescriptionRay又对数字的列产生了兴趣:现有四张卡片,用这四张卡片能排列出很多不同的4位数,要求按从小到大的顺序输出这些4位数。Input每组数据占一行,代表四张卡片上的数字(0<=数字<=9),如果四张卡片都是0,则输入结束。Output对每组卡片按从小到大的顺序输出所有能由这四张卡片组成
阅读全文