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<stdio.h>
int a, b, sum, cnt;
int main()
{
scanf("%d %d",&a,&b);
if(b<=3)
{
printf("\n");
printf("0");
}
else
{
if(a<=3)
{
a=4;
}
if(a%2!=0)
{
a+=1;
}
if(b%2!=0)
{
b-=1;
}
cnt=(b/2)-(a/2)+1;
if(cnt%2==0)
{
sum=(a+b)*(cnt/2);
}
else if(cnt%2!=0)
{
sum=((a+b)*(cnt/2))+a+((cnt/2)*2);
}
printf("\n");
printf("%d",sum);
}
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... |