結果

問題 No.638 Sum of "not power of 2"
コンテスト
ユーザー ntuda
提出日時 2024-05-27 15:56:32
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 24 ms / 1,000 ms
+ 439µs
コード長 201 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 62 ms
コンパイル使用メモリ 82,020 KB
実行使用メモリ 55,868 KB
最終ジャッジ日時 2026-10-05 07:43:28
合計ジャッジ時間 1,596 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N = int(input())
x = 1
S = {x}
while x << 1 < N:
    x <<= 1
    S.add(x)
for i in range(1,N):
    if i in S:
        continue
    if N - i in S:
        continue
    print(i,N-i)
    exit()
print(-1)
0