Problem hidden
TJU1 - Divisors
Input
Two integers a and b for each test case, 1 ≤ a ≤ b ≤ 231 - 1. The input is terminated by a line with a = b = 0.Output
The value of f(a) + f(a+1) + ... + f(b).Sample Input
9 12 1 2147483647 0 0
Sample Output
15 46475828386
Hint
For the first test case:9 has 3 divisors: 1, 3, 9.
10 has 4 divisors: 1, 2, 5, 10.
11 has 2 divisors: 1, 11.
12 has 6 divisors: 1, 2, 3, 4, 6, 12.
So the answer is 3 + 4 + 2 + 6 = 15.
if you find Source code limit is small here you can solve the tutorial version here :
http://www.spoj.com/problems/TJUT1/
Added by: | abdou_93 |
Date: | 2013-10-15 |
Time limit: | 1s |
Source limit: | 1000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | TJU |