20 lines
388 B
C++
20 lines
388 B
C++
#include <iostream>
|
|
#include <cmath>
|
|
#define lint long long
|
|
using namespace std;
|
|
int main(){
|
|
lint a,b,o1,o2;
|
|
while(cin>>a>>b){
|
|
o1 = 0,o2 = 0;
|
|
if(a>b)a^=b^=a^=b;
|
|
for(;a<=b;a++){
|
|
if(a%2 == 0)
|
|
o1 += pow(a,2);
|
|
else
|
|
o2 += pow(a,3);
|
|
}
|
|
cout << o1 << ' ' << o2 << endl;
|
|
}
|
|
return 0;
|
|
}
|