結果
問題 | No.1298 OR XOR |
ユーザー | NatsubiSogan |
提出日時 | 2020-11-27 22:05:11 |
言語 | Python3 (3.11.6 + numpy 1.26.0 + scipy 1.11.3) |
結果 |
AC
|
実行時間 | 16 ms / 2,000 ms |
コード長 | 216 bytes |
コンパイル時間 | 139 ms |
コンパイル使用メモリ | 10,516 KB |
実行使用メモリ | 8,080 KB |
最終ジャッジ日時 | 2023-10-01 06:00:55 |
合計ジャッジ時間 | 1,373 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
7,808 KB |
testcase_01 | AC | 16 ms
8,076 KB |
testcase_02 | AC | 16 ms
8,080 KB |
testcase_03 | AC | 16 ms
8,068 KB |
testcase_04 | AC | 16 ms
8,012 KB |
testcase_05 | AC | 15 ms
8,064 KB |
testcase_06 | AC | 16 ms
7,888 KB |
testcase_07 | AC | 15 ms
7,904 KB |
testcase_08 | AC | 15 ms
7,884 KB |
testcase_09 | AC | 16 ms
7,736 KB |
testcase_10 | AC | 16 ms
7,776 KB |
testcase_11 | AC | 16 ms
7,884 KB |
testcase_12 | AC | 15 ms
7,812 KB |
testcase_13 | AC | 16 ms
7,736 KB |
ソースコード
n = int(input()) if bin(n)[2:].count("1") == 1: exit(print(-1, -1, -1)) b = bin(n)[2:] l = len(b) ans = 0 for i in range(l): if b[i] == "1": ans = 1 << (l - i - 1) break print(ans, n - ans, n)