Accounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for preparing annual report for MS Inc. All what they remember is that MS Inc. posted a surplus or a deficit each month of 1999 and each month when MS In…
Candy Distribution Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6033 Accepted: 3351 Description N children standing in circle who are numbered 1 through N clockwise are waiting their candies. Their teacher distributes the candies by…
题目链接:http://poj.org/problem?id=2992 题目要求:Your task in this problem is to determine the number of divisors of Cnk. Just for fun -- or do you need any special reason for such a useful computation? 题目解析:这题也是TLE了无数遍,首先说一下求因子数目的函数是积性函数,积性函数即f(n)=f(a)*f(b)…