标签:div color style sum swa stream amp swap span
#include<iostream> #include<algorithm> using namespace std; int main() { int m, n; while (cin >> m && cin >> n) { if (m > n) swap(m, n); int odd_sum = 0, even_sum = 0; for (int i = m;i <= n;i++) { if (i % 2 == 0) { even_sum += i * i; } else { odd_sum += i * i*i; } } cout << even_sum << " " << odd_sum<<endl; } return 0; }
标签:div color style sum swa stream amp swap span
原文地址:https://www.cnblogs.com/Mered1th/p/10556126.html