結果

問題 No.638 Sum of "not power of 2"
ユーザー wajima_wataru
提出日時 2018-03-03 15:50:02
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 33 ms / 1,000 ms
コード長 211 bytes
コンパイル時間 113 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-06-24 16:49:23
合計ジャッジ時間 1,274 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

pows = [2 ** i for i in range(61)]
N = int(input())
ans = None
for i in range(1, N):
    if i not in pows and N - i not in pows:
        ans = str(i) + ' ' + str(N - i)
        break
print(ans if ans else '-1')
0