結果
問題 | No.638 Sum of "not power of 2" |
ユーザー |
![]() |
提出日時 | 2020-02-18 22:22:45 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 30 ms / 1,000 ms |
コード長 | 280 bytes |
コンパイル時間 | 159 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-10-06 15:49:40 |
合計ジャッジ時間 | 1,397 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
ソースコード
N = int(input()) if N%2 == 0: if N >= 6: ans = "3 " + str(N-3) else: ans = -1 else: if N >= 9: if bin(N-3).count("1") == 1: ans = "5 " + str(N-5) else: ans = "3 " + str(N-3) else: ans = -1 print(ans)