# ZeroJudge - f373: 週年慶 Anniversary ### 題目連結:https://zerojudge.tw/ShowProblem?problemid=f373 ###### tags: `ZeroJudge` ```cpp= #include <iostream> using namespace std; int main() { cin.sync_with_stdio(false); cin.tie(nullptr); int buy; while (cin >> buy) if ((buy / 1000) & 1) cout << buy - buy / 1000 * 100 << " 1\n"; else cout << buy - buy / 2000 * 200 << " 0\n"; } ```