math
Time Limit:1s | Memory limit:32M |
Accepted Submit:80 | Total Submit:513 |
Problem DescriptionInputOutputSample Input4 2 9 1 Sample Output2 27 Hint:N = 9, d = 1 Answer: 1 + 2 + 4 + 5 + 7 + 8 = 27; |
http://acm.fzu.edu.cn/problem.php?pid=1701
这一题很容易就超时,我用的是辗转相除法,如果就直接这样,会超时,还从中筛选了一些数据,勉强地过了