結果

問題 No.1298 OR XOR
ユーザー 👑 H20H20
提出日時 2020-11-27 21:43:10
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 267 bytes
コンパイル時間 392 ms
コンパイル使用メモリ 86,720 KB
実行使用メモリ 71,484 KB
最終ジャッジ日時 2023-10-01 05:11:21
合計ジャッジ時間 3,143 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,208 KB
testcase_01 AC 75 ms
71,256 KB
testcase_02 AC 73 ms
71,308 KB
testcase_03 AC 73 ms
71,144 KB
testcase_04 AC 74 ms
71,148 KB
testcase_05 AC 70 ms
71,312 KB
testcase_06 AC 74 ms
71,336 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
NBIT = N
cnt = 0
A = 0
B =  0
while NBIT:
    if NBIT & 1 == 1:
        cnt+=1
        if cnt % 2==0:
            A+=1
        else:
            B+=1
    A <<= 1
    B <<= 1
    NBIT >>= 1
if cnt%2==1:
    print(-1,-1,-1)
else:
    print(N,A>>1,B>>1)
0