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>
#include <algorithm>
using namespace std;
int p[2000];
typedef long long ll;
ll s(ll n){
if(n&1)return s(n-1);
return (n/2)*(n/2+1);
}
int main() {
ll a,b;scanf("%lld %lld",&a,&b);
printf("%lld",s(b)-s(a-1));
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |