Submission #95863

# Submission time Handle Problem Language Result Execution time Memory
95863 2019-02-03T08:43:12 Z Rouge_Hugo Savrsen (COCI17_savrsen) C++14
30 / 120
1690 ms 39664 KB
#include <bits/stdc++.h>
using namespace std;
int s[10000007];

int main()
{
	int a,b;cin>>a>>b;
	for(int i=1;i<=b;i++)
	{
		for(int j=i+i;j<=b;j+=i)
		{
			s[j]-=i;
		}
	}
	int sum=0;
for(int i=a;i<=b;i++)
{
sum+=abs(i+s[i]);	
}
cout<<sum;
 return 0;

}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Incorrect 4 ms 760 KB Output isn't correct
4 Incorrect 1579 ms 39664 KB Output isn't correct
5 Incorrect 1690 ms 39416 KB Output isn't correct
6 Incorrect 1670 ms 39496 KB Output isn't correct
7 Incorrect 1473 ms 36424 KB Output isn't correct
8 Incorrect 127 ms 10232 KB Output isn't correct