제출 #2815

#제출 시각아이디문제언어결과실행 시간메모리
2815mh5664다각형 (GA5_polygon)C++98
0 / 100
0 ms1088 KiB
#include <stdio.h>

int main ()
{
	long long int n, m;

	scanf ("%lld %lld", &n, &m);

	long long int sol;
	--n;
	if (n < 2)
		n = 2;
	if (n % 2 == 1)
		--n;
	if (m % 2 == 1)
		--m;
	sol = ((m / 2) + 1) * m / 2 - ((n / 2) + 1) * n / 2;
	printf ("%lld", sol);
	return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...