結果

問題 No.638 Sum of "not power of 2"
ユーザー mlihua09mlihua09
提出日時 2020-12-05 20:04:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 1,000 ms
コード長 234 bytes
コンパイル時間 290 ms
コンパイル使用メモリ 87,012 KB
実行使用メモリ 71,556 KB
最終ジャッジ日時 2023-10-14 05:21:07
合計ジャッジ時間 2,390 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,112 KB
testcase_01 AC 74 ms
71,308 KB
testcase_02 AC 73 ms
71,052 KB
testcase_03 AC 73 ms
71,284 KB
testcase_04 AC 74 ms
71,120 KB
testcase_05 AC 73 ms
71,260 KB
testcase_06 AC 70 ms
71,412 KB
testcase_07 AC 71 ms
71,272 KB
testcase_08 AC 71 ms
71,556 KB
testcase_09 AC 72 ms
71,116 KB
testcase_10 AC 72 ms
71,260 KB
testcase_11 AC 74 ms
71,220 KB
testcase_12 AC 73 ms
71,264 KB
testcase_13 AC 73 ms
71,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

if N < 6 or N == 7:
    print(-1)
    
else:
    if bin(N - 3).count('1') != 1:
        print(3, N - 3)
        
    elif bin(N - 5).count('1') != 1:
        print(5, N - 5)
        
    else:
        print(6, N - 6)
0