結果
問題 | No.638 Sum of "not power of 2" |
ユーザー | Ryuto |
提出日時 | 2018-01-30 15:00:25 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 283 bytes |
コンパイル時間 | 276 ms |
コンパイル使用メモリ | 86,948 KB |
実行使用メモリ | 71,620 KB |
最終ジャッジ日時 | 2023-08-28 18:21:38 |
合計ジャッジ時間 | 5,276 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 73 ms
71,600 KB |
testcase_01 | AC | 87 ms
71,488 KB |
testcase_02 | AC | 78 ms
71,164 KB |
testcase_03 | AC | 73 ms
71,620 KB |
testcase_04 | WA | - |
testcase_05 | AC | 74 ms
70,988 KB |
testcase_06 | AC | 73 ms
71,356 KB |
testcase_07 | AC | 73 ms
71,400 KB |
testcase_08 | TLE | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
ソースコード
import math n = int(input()) alist = [x for x in range(1, n) if math.frexp(x)[0] != 0.5] for (i, a1) in enumerate(alist): if a1 > n/2: print('-1') exit() for a2 in alist[i+1:]: if a1+a2 == n: print(a1, a2) exit() print('-1')