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);
if (c >= 2) res -= 2;
return res;
}
int main() {
int a, b;
scanf("%d %d", &a, &b);
printf("%lld\n", sums(b) - sums(a - 1));
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... |