mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-24 02:48:48 +00:00
24 lines
316 B
C++
24 lines
316 B
C++
|
#include <iostream>
|
||
|
|
||
|
using std::cin;
|
||
|
using std::cout;
|
||
|
const char endl = '\n';
|
||
|
|
||
|
int x, y, ans;
|
||
|
|
||
|
int main() {
|
||
|
std::ios::sync_with_stdio(false);
|
||
|
|
||
|
cin >> x >> y;
|
||
|
|
||
|
if (y < x) std::swap(x, y);
|
||
|
|
||
|
for (int i = x + 1; i < y; i++) {
|
||
|
if (i & 1) ans += i;
|
||
|
}
|
||
|
|
||
|
cout << ans << endl;
|
||
|
|
||
|
return 0;
|
||
|
}
|