摘要:题目:http://acm.hdu.edu.cn/showproblem.php?pid=4704 题目描述: 给定一个整数N,有一个函数S(x),S(x)表示把整数N分成x份有多少个方法。 求S(1)+S(2)+......+S(N)的和。 分析:可以把N看出N个小球(把N看出N个1的和),放入x
阅读全文
摘要:I - Saving Beans HDU - 3037 Although winter is far away, squirrels have to work day and night to save beans. They need plenty of food to get through t
阅读全文
摘要:F - 青蛙的约会 两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方
阅读全文
摘要:G - 美素数 HDU - 4548 小明对数的研究比较热爱,一谈到数,脑子里就涌现出好多数的问题,今天,小明想考考你对素数的认识。 问题是这样的:一个十进制数,如果是素数,而且它的各位数字和也是素数,则称之为“美素数”,如29,本身是素数,而且2+9 = 11也是素数,所以它是美素数。 给定一个区
阅读全文
摘要:E - Revenge of GCD In mathematics, the greatest common divisor (gcd), also known as the greatest common factor (gcf), highest common factor (hcf), or
阅读全文
摘要:D - Beautiful Numbers Vitaly is a very weird man. He's got two favorite digits a and b. Vitaly calls a positive integer good, if the decimal represent
阅读全文
摘要:B - Fedya and Maths Fedya studies in a gymnasium. Fedya's maths hometask is to calculate the following expression: (1^n + 2^n + 3^n + 4^n) mod 5 for g
阅读全文
摘要:A - k-rounding For a given positive integer n denote its k-rounding as the minimum positive integer x, such that x ends with k or more zeros in base 1
阅读全文
摘要:C - A/B 要求(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)。 Out
阅读全文