This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <cstdio>
long long int sums(int c) {
long long int res = c / 2;
res *= (res + 1);
return res;
}
int main() {
int a, b;
long long int res;
scanf("%d %d", &a, &b);
res = sums(b) - sums(a);
if (a < 2 && b >= 2) {
res -= 2;
}
printf("%lld\n", res);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |