結果
| 問題 | No.1298 OR XOR | 
| コンテスト | |
| ユーザー |  neterukun | 
| 提出日時 | 2020-11-27 21:29:57 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 42 ms / 2,000 ms | 
| コード長 | 275 bytes | 
| コンパイル時間 | 357 ms | 
| コンパイル使用メモリ | 82,048 KB | 
| 実行使用メモリ | 52,224 KB | 
| 最終ジャッジ日時 | 2024-07-23 22:08:28 | 
| 合計ジャッジ時間 | 1,819 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 13 | 
ソースコード
n = int(input())
# 0, 0, 0 or 0, 0, 1 or 0, 1, 1
ans = [0] * 3
idx = 0
for i in range(30):
    if (n >> i) & 1:
        ans[idx] |= 1 << i
        ans[(idx + 1) % 3] |= 1 << i
        idx += 1
        idx %= 3
if min(ans) == 0:
    print(-1, -1, -1)
else:
    print(*ans)
            
            
            
        