标签:
Description
Input
Output
Sample Input
Sample Output
#include<stdio.h> int main() { long n,m,t; while(scanf("%ld %ld",&n,&m)!=EOF) { if(n>m) { t=n; n=m; m=t; } long i; long x=0; long y=0; for(i=n;i<=m;i++) { if(i%2==0) x+=i*i; else y+=i*i*i; } printf("%ld %ld\n",x,y); } return 0; }
标签:
原文地址:http://www.cnblogs.com/hfc-xx/p/4905217.html