結果

問題 No.638 Sum of "not power of 2"
ユーザー RyutoRyuto
提出日時 2018-01-30 15:01:37
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 281 bytes
コンパイル時間 1,533 ms
コンパイル使用メモリ 86,656 KB
実行使用メモリ 516,428 KB
最終ジャッジ日時 2023-08-28 18:22:04
合計ジャッジ時間 4,740 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,156 KB
testcase_01 AC 72 ms
71,400 KB
testcase_02 AC 74 ms
71,484 KB
testcase_03 AC 72 ms
71,532 KB
testcase_04 AC 74 ms
71,220 KB
testcase_05 AC 73 ms
71,056 KB
testcase_06 AC 73 ms
71,532 KB
testcase_07 AC 74 ms
71,296 KB
testcase_08 MLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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:]:
        if a1+a2 == n:
            print(a1, a2)
            exit()
print('-1')
0