답안 #4128

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
4128 2013-09-01T17:39:02 Z pichulia 다각형 (GA5_polygon) C++
100 / 100
0 ms 1088 KB
#include<stdio.h>
long long int a,b,c,d;
long long int f(long long int x)
{
	x/=2;
	x=x*(x+1);
	return x>0?x-2:0;
}
int main()
{
	scanf("%lld %lld",&a,&b);
	printf("%lld\n",f(b)-f(a-1));
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1088 KB Output is correct
2 Correct 0 ms 1088 KB Output is correct
3 Correct 0 ms 1088 KB Output is correct
4 Correct 0 ms 1088 KB Output is correct
5 Correct 0 ms 1088 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1088 KB Output is correct
2 Correct 0 ms 1088 KB Output is correct
3 Correct 0 ms 1088 KB Output is correct
4 Correct 0 ms 1088 KB Output is correct
5 Correct 0 ms 1088 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1088 KB Output is correct
2 Correct 0 ms 1088 KB Output is correct
3 Correct 0 ms 1088 KB Output is correct
4 Correct 0 ms 1088 KB Output is correct
5 Correct 0 ms 1088 KB Output is correct