c++
#include <iostream>
using namespace std;
int x, y;
int main()
{
while (cin >> x >> y)
{
int odd = 0, eve = 0;
if (x > y) swap(x, y);
for (int i = x; i <= y; i ++ )
if (i % 2) odd += i * i * i;
else eve += i * i;
cout << eve << ' ' << odd << endl;
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发