結果

問題 No.638 Sum of "not power of 2"
コンテスト
ユーザー rlangevin
提出日時 2023-01-03 21:56:11
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 28 ms / 1,000 ms
+ 455µs
コード長 232 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 63 ms
コンパイル使用メモリ 81,804 KB
実行使用メモリ 61,184 KB
最終ジャッジ日時 2026-09-30 14:56:48
合計ジャッジ時間 1,954 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge4_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N = int(input())
two = 1
S = set()
for i in range(65):
    S.add(two)
    two *= 2
    
for i in range(1, 10000):
    if i in S:
        continue
    if N - i not in S and N - i >= 1:
        print(i, N - i)
        exit()
print(-1)
0