結果
| 問題 | No.524 コインゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-08-30 15:13:36 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 280 bytes |
| コンパイル時間 | 1,866 ms |
| コンパイル使用メモリ | 166,056 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-08-30 15:13:45 |
| 合計ジャッジ時間 | 8,618 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 31 WA * 1 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
int c = n;
int ans = 0;
for (int i = 0; i < c&3; i++) {
ans ^= (n-i);
}
cout << (ans == 0 ? "X\n": "O\n");
}