0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-27 23:16:27 +00:00
OI-codes/AcWing/714/714.cpp

24 lines
316 B
C++
Raw Normal View History

#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;
}