結果

問題 No.638 Sum of "not power of 2"
ユーザー tails1434tails1434
提出日時 2020-01-30 07:31:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 1,000 ms
コード長 329 bytes
コンパイル時間 298 ms
コンパイル使用メモリ 86,800 KB
実行使用メモリ 71,460 KB
最終ジャッジ日時 2023-10-14 08:09:51
合計ジャッジ時間 2,171 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,136 KB
testcase_01 AC 73 ms
71,372 KB
testcase_02 AC 73 ms
71,448 KB
testcase_03 AC 72 ms
71,136 KB
testcase_04 AC 77 ms
71,260 KB
testcase_05 AC 72 ms
71,460 KB
testcase_06 AC 74 ms
71,280 KB
testcase_07 AC 74 ms
71,304 KB
testcase_08 AC 74 ms
71,324 KB
testcase_09 AC 71 ms
71,336 KB
testcase_10 AC 73 ms
71,372 KB
testcase_11 AC 71 ms
71,252 KB
testcase_12 AC 71 ms
71,392 KB
testcase_13 AC 71 ms
71,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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