結果

問題 No.1298 OR XOR
ユーザー rlangevinrlangevin
提出日時 2024-07-04 08:54:57
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 267 bytes
コンパイル時間 166 ms
コンパイル使用メモリ 82,460 KB
実行使用メモリ 54,028 KB
最終ジャッジ日時 2024-07-04 08:55:00
合計ジャッジ時間 2,341 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 8 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
ans = [0, 0, 0]
cnt = 0
for i in range(65):
    if (N >> i) & 1:
        ans[0] += 1 << i
        if cnt % 2:
            ans[1] += 1 << i
        else:
            ans[2] += 1 << i
        cnt += 1
        
print(*ans) if 0 not in ans else print(-1)
0