結果
問題 | No.524 コインゲーム |
ユーザー |
![]() |
提出日時 | 2023-02-13 06:35:39 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 581 bytes |
コンパイル時間 | 1,764 ms |
コンパイル使用メモリ | 190,400 KB |
最終ジャッジ日時 | 2025-02-10 14:52:40 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 WA * 10 |
ソースコード
#include <bits/stdc++.h>using namespace std;#define rep(i, l, r) for (int i = (int)(l); i < (int)(r); i++)#define rrep(i, r, l) for (int i = (int)(r); i > (int)(l); i--)#define all(a) (a).begin(), (a).end()#define rall(a) (a).rbegin(), (a).rend()void solve() {long long n;cin >> n;long long power = 1;rep(i, 0, 32) {power <<= 1;if (power - 1 == n) {cout << "X" << '\n';return;}}cout << "O" << '\n';}int main() {int t = 1;// cin >> t;while (t--) {solve();}}