結果

問題 No.638 Sum of "not power of 2"
ユーザー akitsugu777akitsugu777
提出日時 2018-11-14 13:27:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 246 bytes
コンパイル時間 168 ms
コンパイル使用メモリ 10,584 KB
実行使用メモリ 7,952 KB
最終ジャッジ日時 2023-08-26 01:02:30
合計ジャッジ時間 3,165 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,952 KB
testcase_01 AC 17 ms
7,868 KB
testcase_02 AC 16 ms
7,816 KB
testcase_03 AC 16 ms
7,892 KB
testcase_04 AC 16 ms
7,920 KB
testcase_05 AC 15 ms
7,816 KB
testcase_06 AC 16 ms
7,788 KB
testcase_07 AC 16 ms
7,948 KB
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
nl = [2**i for i in range(int(n**0.5)+1)]

l = []
for i in range(1, n):
    x = i
    y = n - i
    if not x in nl and not y in nl:
        l.append(x)

l = sorted(l)

if len(l) == 0:
    print(-1)
else:
    print(l[0], n - l[0])
0