結果

問題 No.638 Sum of "not power of 2"
ユーザー kohei2019kohei2019
提出日時 2022-02-24 23:29:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 1,000 ms
コード長 247 bytes
コンパイル時間 720 ms
コンパイル使用メモリ 87,152 KB
実行使用メモリ 71,412 KB
最終ジャッジ日時 2023-09-15 10:26:47
合計ジャッジ時間 2,892 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,296 KB
testcase_01 AC 71 ms
71,320 KB
testcase_02 AC 69 ms
71,376 KB
testcase_03 AC 70 ms
71,212 KB
testcase_04 AC 71 ms
71,208 KB
testcase_05 AC 71 ms
71,412 KB
testcase_06 AC 72 ms
71,328 KB
testcase_07 AC 72 ms
71,404 KB
testcase_08 AC 72 ms
71,076 KB
testcase_09 AC 71 ms
71,064 KB
testcase_10 AC 71 ms
71,340 KB
testcase_11 AC 72 ms
71,388 KB
testcase_12 AC 72 ms
71,108 KB
testcase_13 AC 71 ms
71,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
ans = -1
set2 = set()
i = 1
while i <= 10**18:
    set2.add(i)
    i *= 2

for i in [3,5,7,9,10,11,12,13,14,15]:
    a = i
    b = N-a
    if b <= 0:
        break
    if not b in set2:
        print(a,b)
        exit()
print(ans)
0