結果

問題 No.638 Sum of "not power of 2"
ユーザー daku9640daku9640
提出日時 2018-08-05 22:14:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 35 ms / 1,000 ms
コード長 219 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 11,888 KB
実行使用メモリ 10,128 KB
最終ジャッジ日時 2023-10-19 22:06:37
合計ジャッジ時間 1,241 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
10,128 KB
testcase_01 AC 33 ms
10,128 KB
testcase_02 AC 33 ms
10,128 KB
testcase_03 AC 35 ms
10,128 KB
testcase_04 AC 33 ms
10,128 KB
testcase_05 AC 30 ms
10,128 KB
testcase_06 AC 31 ms
10,128 KB
testcase_07 AC 34 ms
10,128 KB
testcase_08 AC 34 ms
10,128 KB
testcase_09 AC 33 ms
10,128 KB
testcase_10 AC 34 ms
10,128 KB
testcase_11 AC 31 ms
10,128 KB
testcase_12 AC 31 ms
10,128 KB
testcase_13 AC 31 ms
10,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    n = int(input())
    if n == 6:
        return "3 3"
    if n < 8:
        return -1
    if bin(n)[2:].count('1') == 3 and n & 3 == 3:
        return f"5 {n - 5}"
    return f"3 {n - 3}"
print(solve())
0