Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)
Total Submission(s): 1731 Accepted Submission(s): 656
Problem Description
Let us define a sequence as below
Your job is simple, for each task, you should output 7.
1=A
2=B
⌋
Your job is simple, for each task, you should output 7.
Input
The first line has only one integer 9
Sample Input
2
3 3 2 1 3 5
3 2 2 2 1 4
Sample Output
36
24
Source
cin>>n; ll ans = 0; for(ll l = 1,r;l <= n;l = r + 1){ r = n / (n / l); ans += (r - l + 1) * (n / l); } cout<<ans<<endl;