标签:print include class ++ ret nbsp return space namespace
#include<bits/stdc++.h> using namespace std; int main() { int m,n,s1 = 0,s2 = 0; while(scanf("%d %d",&m,&n)!=EOF){ s1 = s2 = 0; int mm; if(m > n){//题目没说m<n mm = m; m = n; n = mm; } for(int i = m;i <= n;i++){ if(i % 2){ s2 += i*i*i; }else{ s1 += i*i; } } printf("%d %d\n",s1,s2); } return 0; }
标签:print include class ++ ret nbsp return space namespace
原文地址:https://www.cnblogs.com/zhibin123/p/10489917.html