結果

問題 No.638 Sum of "not power of 2"
コンテスト
ユーザー tails1434
提出日時 2020-01-30 07:31:43
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 64 ms / 1,000 ms
+ 549µs
コード長 329 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 248 ms
コンパイル使用メモリ 95,980 KB
実行使用メモリ 78,976 KB
最終ジャッジ日時 2026-08-28 11:01:27
合計ジャッジ時間 2,547 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

def main():
    N = int(input())
    c = [0]
    for i in range(100):
        c.append(2 ** i)

    for i in range(N // 2 + 2):
        if i in c:
            continue
        elif N - i in c:
            continue
        else:
            print(i, N - i)
            exit()

    print(-1)


if __name__ == "__main__":
    main()
0