結果

問題 No.1298 OR XOR
ユーザー H20
提出日時 2020-11-27 22:32:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 210 bytes
コンパイル時間 508 ms
コンパイル使用メモリ 82,568 KB
実行使用メモリ 53,556 KB
最終ジャッジ日時 2024-07-26 18:50:19
合計ジャッジ時間 1,602 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
NBIT = N
cnt = 0
while NBIT:
    if NBIT & 1 == 1:
        cnt+=1
    NBIT >>= 1
if cnt>=2:
    B = '1'+'0'*(len(format(N,'b'))-1)
    B = int(B,2)
    print(N,B,N-B)
else:
    print(-1,-1,-1)
0