제출 #2890

#제출 시각아이디문제언어결과실행 시간메모리
2890tncks0121다각형 (GA5_polygon)C++98
100 / 100
0 ms1088 KiB
#include <cstdio> long long int sums(int c) { if(c<2) return 0; long long int res = c / 2; res *= (res + 1); return res-2; } int main() { int a, b; long long int res; scanf("%d %d", &a, &b); res = sums(b) - sums(a-1); if (a < 2 && b >= 2) { //res -= 2; } printf("%lld\n", res); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...