結果

問題 No.1298 OR XOR
ユーザー toyuzukotoyuzuko
提出日時 2020-12-06 00:40:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 264 bytes
コンパイル時間 386 ms
コンパイル使用メモリ 86,900 KB
実行使用メモリ 71,476 KB
最終ジャッジ日時 2023-10-14 12:17:27
合計ジャッジ時間 2,860 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,108 KB
testcase_01 AC 68 ms
71,340 KB
testcase_02 AC 66 ms
71,248 KB
testcase_03 AC 67 ms
71,224 KB
testcase_04 AC 68 ms
71,120 KB
testcase_05 AC 66 ms
71,200 KB
testcase_06 AC 68 ms
71,156 KB
testcase_07 AC 67 ms
71,376 KB
testcase_08 AC 66 ms
71,476 KB
testcase_09 AC 69 ms
71,208 KB
testcase_10 AC 68 ms
71,280 KB
testcase_11 AC 67 ms
71,248 KB
testcase_12 AC 68 ms
71,088 KB
testcase_13 AC 68 ms
71,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

A = B = C = 0

for i in range(31):
    if (N >> i) & 1:
        if A:
            B += 1 << i
            C += 1 << i
        else:
            A += 1 << i
            B += 1 << i

if A and B and C:
    print(A, B, C)

else:
    print(-1, -1, -1)
0