結果

問題 No.1298 OR XOR
ユーザー naniwazunaniwazu
提出日時 2020-11-27 22:15:13
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 238 bytes
コンパイル時間 1,495 ms
コンパイル使用メモリ 86,500 KB
実行使用メモリ 71,360 KB
最終ジャッジ日時 2023-10-01 06:23:46
合計ジャッジ時間 3,447 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
70,880 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 77 ms
71,028 KB
testcase_06 AC 82 ms
71,112 KB
testcase_07 AC 77 ms
71,164 KB
testcase_08 AC 78 ms
71,160 KB
testcase_09 AC 80 ms
71,036 KB
testcase_10 AC 77 ms
71,040 KB
testcase_11 AC 77 ms
71,252 KB
testcase_12 AC 77 ms
70,880 KB
testcase_13 AC 78 ms
71,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = 0
B = 0
C = N
flag = False
for i in range(30):
    if N >> i & 1:
        if flag:
            A += 1 << i
        else:
            B += 1 << i
            flag = True
if B:
    print(A,B,C)
else:
    print(-1,-1,-1)
0