結果
問題 |
No.1450 nahco314's First Problem
|
ユーザー |
![]() |
提出日時 | 2021-03-31 15:52:39 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 385 bytes |
コンパイル時間 | 269 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 57,600 KB |
最終ジャッジ日時 | 2024-11-08 14:18:44 |
合計ジャッジ時間 | 3,743 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 36 WA * 1 |
ソースコード
mod = 1000000007 eps = 10**-9 def main(): import sys input = sys.stdin.readline X = int(input()) for M in range(62): N = X ^ M cnt = 0 for i in range(62): cnt += N >> i & 1 if cnt == M: if N <= 2 * 10 ** 18: print(N) exit() print(-1) if __name__ == '__main__': main()