Submission #7798

#TimeUsernameProblemLanguageResultExecution timeMemory
7798jackae98다각형 (GA5_polygon)C++98
60 / 100
0 ms1088 KiB
#include <stdio.h> long long int a,b; long long int f(int a){ return (a*(a+1)/2); } int main(){ scanf("%lld %lld",&a,&b); long long int ans = (f(b/2)-f((a-1)/2))*2; if(a<=2 && b>=2) ans-=2; printf("%lld",ans); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...