杭电2007,在VC上过不了呀,
#include<stdio.h>int main()
{
int m,n,a=0,b=0,i,j;
while(scanf("%d%d",&m,&n)!=EOF)
if(m%2==0)
{
for(i=m;i<=n;i+=2)
a+=i*i;
for(j=m+1;j<=n;j+=2)
b+=j*j*j;
printf("%d%d",a,b);
}
else
{
for(i=m+1;i<=n;i+=2)
a+=i*i;
for(j=m;j<=n;j+=2)
b+=j*j*j;
printf("%d%d",a,b);
}
return 0;
}