結果
| 問題 | No.1298 OR XOR | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2021-02-25 18:50:48 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 39 ms / 2,000 ms | 
| コード長 | 329 bytes | 
| コンパイル時間 | 204 ms | 
| コンパイル使用メモリ | 82,240 KB | 
| 実行使用メモリ | 52,960 KB | 
| 最終ジャッジ日時 | 2024-10-01 08:58:52 | 
| 合計ジャッジ時間 | 1,494 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 13 | 
ソースコード
N = int(input())
ABC = [0] * 3
itr = 0
N = str(bin(N))
while len(N) > 0:
    for i in range(3):
        ABC[i] *= 2
    if N[0] == "1":
        for i in range(3):
            if i == itr % 3:
                continue
            ABC[i] += 1
    itr += 1
    N = N[1:]
if min(ABC) == 0:
    print(-1, -1, -1)
else:
    print(*ABC)
            
            
            
        