結果

問題 No.638 Sum of "not power of 2"
ユーザー 👑 KazunKazun
提出日時 2020-06-10 18:15:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 1,000 ms
コード長 210 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 86,864 KB
実行使用メモリ 71,376 KB
最終ジャッジ日時 2023-09-05 15:23:08
合計ジャッジ時間 2,209 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,124 KB
testcase_01 AC 73 ms
71,300 KB
testcase_02 AC 71 ms
71,304 KB
testcase_03 AC 72 ms
71,316 KB
testcase_04 AC 74 ms
71,376 KB
testcase_05 AC 71 ms
71,064 KB
testcase_06 AC 73 ms
71,344 KB
testcase_07 AC 73 ms
71,352 KB
testcase_08 AC 73 ms
71,368 KB
testcase_09 AC 72 ms
71,108 KB
testcase_10 AC 72 ms
71,296 KB
testcase_11 AC 71 ms
71,316 KB
testcase_12 AC 72 ms
71,180 KB
testcase_13 AC 72 ms
71,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

K=[1]*60
for i in range(59):
    K[i+1]=K[i]<<1

K=set(K)

N=int(input())
for i in range(1,N//2+1):
    if (i not in K) and ((N-i) not in K):
        print(i,N-i)
        sys.exit()

print(-1)
    
0