Submission #4128

# Submission time Handle Problem Language Result Execution time Memory
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));
}
# Verdict Execution time Memory 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
# Verdict Execution time Memory 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
# Verdict Execution time Memory 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