結果

問題 No.638 Sum of "not power of 2"
ユーザー c_r_5
提出日時 2018-10-27 13:13:37
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 35 ms / 1,000 ms
コード長 321 bytes
コンパイル時間 111 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-19 06:38:52
合計ジャッジ時間 1,335 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
l=[1]
t=2
while t<=n:
    l.append(t)
    t*=2
for a in range(1,n+1):
    for t in l:
        if a==t:
            break
    else:
        b=n-a
        if b<1:continue
        for t in l:
            if b==t:
                break
        else:
            print(a,b)
            break
else:
    print(-1)
0