結果
問題 | No.524 コインゲーム |
ユーザー |
|
提出日時 | 2017-06-02 22:55:56 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 975 bytes |
コンパイル時間 | 1,005 ms |
コンパイル使用メモリ | 112,028 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-21 23:54:08 |
合計ジャッジ時間 | 9,313 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 WA * 8 TLE * 3 |
ソースコード
#include "iostream"#include "climits"#include "list"#include "queue"#include "stack"#include "set"#include "functional"#include "algorithm"#include "math.h"#include "utility"#include "string"#include "map"#include "unordered_map"#include "iomanip"#include "random"using namespace std;const long long int MOD = 1000000007;list<long long int> Prime(int M) {list<long long int>P;P.push_back(2);P.push_back(3);for (int i = 5; i <= M; i += 6) {bool flag = true;for (auto j : P) {if (i%j == 0) {flag = false;break;}}if (flag)P.push_back(i);flag = true;for (auto j : P) {if ((i + 2) % j == 0) {flag = false;break;}}if (flag)P.push_back(i + 2);}return P;}long long int N;long long int ans;long long int H, W;long long int K;int main() {ios::sync_with_stdio(false);cin >> N;for (int i = 1; i <= N; i++) {ans ^= i;}if (ans > N||ans==0)cout << "X\n";else cout << "O\n";}