結果
| 問題 |
No.524 コインゲーム
|
| ユーザー |
square1001
|
| 提出日時 | 2017-06-02 22:44:38 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 369 bytes |
| コンパイル時間 | 789 ms |
| コンパイル使用メモリ | 82,644 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-21 23:25:00 |
| 合計ジャッジ時間 | 1,882 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 WA * 10 |
ソースコード
#include <cmath>
#include <string>
#include <vector>
#include <iomanip>
#include <iostream>
#include <algorithm>
#include <functional>
#pragma warning(disable : 4996)
using namespace std;
long long n;
int main() {
cin >> n;
if (n == 1) cout << "X" << endl;
else {
long long b = 1;
while (b < n) b *= 2;
cout << (b == n + 1 ? "X" : "O") << endl;
}
return 0;
}
square1001