結果

問題 No.638 Sum of "not power of 2"
ユーザー GrayCoderGrayCoder
提出日時 2018-01-28 18:24:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 310 bytes
コンパイル時間 121 ms
コンパイル使用メモリ 10,744 KB
実行使用メモリ 7,988 KB
最終ジャッジ日時 2023-08-28 18:21:19
合計ジャッジ時間 1,172 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,956 KB
testcase_01 AC 14 ms
7,968 KB
testcase_02 AC 14 ms
7,916 KB
testcase_03 AC 14 ms
7,956 KB
testcase_04 AC 15 ms
7,904 KB
testcase_05 AC 15 ms
7,908 KB
testcase_06 AC 14 ms
7,896 KB
testcase_07 AC 14 ms
7,988 KB
testcase_08 AC 15 ms
7,976 KB
testcase_09 WA -
testcase_10 AC 14 ms
7,924 KB
testcase_11 AC 14 ms
7,900 KB
testcase_12 AC 14 ms
7,848 KB
testcase_13 AC 15 ms
7,928 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

def main():
    N = int(input())

    if N < 6:
        print(-1)
    elif not N & 1:
        print(3, N - 3)
    else:
        for i in (3, 5, 6):
            j = N - i
            if math.log2(j) % 1:
                print(i, j)
                break
        else:
            print(-1)

main()
0