제출 #86386

#제출 시각아이디문제언어결과실행 시간메모리
86386MaHaMBa_25Savrsen (COCI17_savrsen)C++14
30 / 120
3047 ms536 KiB
#include <bits/stdc++.h>
#define GLHF ios_base::sync_with_stdio(0); cin.tie(), cout.tie();
#define GGWP return 0;
#define ALTF4 exit(0)
#define GCWS/*Good Contest, Well Solved*/ ALTF4
#define ull unsigned long long
#define ll long long
#define ld long double
#define fxr1(x) for(int I = 0; I < x; ++I)
#define fxr(x) for(int I = 0; I <= x; ++I)
#define F first
#define S second

using namespace std;

ll a, b, ans;

int main()
{
	GLHF
	cin >> a >> b;
	for ( int I = a; I <= b; ++I )
	{
		ll cnt = I;
		for ( int J = 1; J <= I/2; ++J )
		{
			if ( I % J == 0 )
				cnt -= J;
		}
		ans += abs(cnt);
	}
	cout << ans << endl;
	GGWP
}

//clang++ -v -std=c++11 finish fishing the fish.people
#Verdict Execution timeMemoryGrader output
Fetching results...