#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#define MAX( a, b ) (a > b) ? a : b
#define MIN( a, b ) (a < b) ? a : b
int main(void)
{
int a;
int b;
int big;
int small;
int sum = 0;
scanf("%d %d",&a,&b);
big = MAX(a,b);
small = MIN(a,b);
int i;
for(i=small;i<=big;i++)
{
if(i % 2 == 0)
sum += i;
}
printf("%d\n",sum);
return 0;
}
沒有留言:
張貼留言