結果

問題 No.1298 OR XOR
ユーザー naniwazunaniwazu
提出日時 2020-11-27 22:16:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 238 bytes
コンパイル時間 466 ms
コンパイル使用メモリ 86,540 KB
実行使用メモリ 71,252 KB
最終ジャッジ日時 2023-10-01 06:25:08
合計ジャッジ時間 2,666 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
71,112 KB
testcase_01 AC 74 ms
71,176 KB
testcase_02 AC 75 ms
70,832 KB
testcase_03 AC 77 ms
71,024 KB
testcase_04 AC 76 ms
71,140 KB
testcase_05 AC 79 ms
70,984 KB
testcase_06 AC 76 ms
71,252 KB
testcase_07 AC 77 ms
71,216 KB
testcase_08 AC 79 ms
71,172 KB
testcase_09 AC 76 ms
70,908 KB
testcase_10 AC 78 ms
71,108 KB
testcase_11 AC 76 ms
70,828 KB
testcase_12 AC 76 ms
71,168 KB
testcase_13 AC 77 ms
70,884 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 A:
    print(A,B,C)
else:
    print(-1,-1,-1)
0