結果

問題 No.524 コインゲーム
ユーザー satakesatake
提出日時 2022-09-14 21:29:18
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 363 bytes
コンパイル時間 3,056 ms
コンパイル使用メモリ 191,620 KB
最終ジャッジ日時 2025-02-07 05:23:33
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using ll = long long;

#ifdef LOCAL
#include "debug.h"
#else
#define debug(...) 710
#endif

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n;
	cin >> n;
	bool f = false;
	int temp = 2;
	for(int i = 0; i < 31; i++){
		temp *= 2;
		if(n == temp - 1){
			f = true;
		}
	}
	cout << (f ? "X" : "O") << endl;
}
0