結果
問題 |
No.1450 nahco314's First Problem
|
ユーザー |
|
提出日時 | 2021-04-03 03:09:13 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 294 bytes |
コンパイル時間 | 256 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 59,264 KB |
最終ジャッジ日時 | 2024-11-08 14:26:15 |
合計ジャッジ時間 | 3,948 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 35 WA * 2 |
ソースコード
X = int(input()) if X==0: print(-1) exit() for i in range(100): if (X>>i)&1: msb = i for M in range(msb+2): N = X^M M2 = 0 for i in range(100): if (N>>i)&1: M2 += 1 if M==M2: print(N) exit() print(-1)