結果
問題 | No.1298 OR XOR |
ユーザー |
![]() |
提出日時 | 2020-11-27 21:25:51 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 40 ms / 2,000 ms |
コード長 | 303 bytes |
コンパイル時間 | 362 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 52,480 KB |
最終ジャッジ日時 | 2024-07-23 21:58:12 |
合計ジャッジ時間 | 1,536 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 13 |
ソースコード
n = int(input())s = format(n, 'b')if s.count('1') == 1:print(-1, -1, -1)exit()s = list(s)s.reverse()flag = Truea, b = 0, 0for i in range(len(s)):if s[i] == '1':if flag:a = 2**iflag = Falseelse:b += 2**ic = nprint(a,b,c)