結果

問題 No.638 Sum of "not power of 2"
ユーザー Navier_Boltzmann
提出日時 2021-12-04 09:20:19
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 24 ms / 1,000 ms
コード長 333 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-06 14:11:42
合計ジャッジ時間 1,236 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
for i in range(2,min(100,N)):
    if i in [1,2,4,8,16,32,64]:
        continue
    st = 1
    res = N-i
    flg = 1
    for k in range(100):
        p = pow(2,k)
        if p > res:
            break
        if p == res:
            flg = 0
            break
    if flg:
        print(i,res)
        exit()
print(-1)
0