結果
| 問題 |
No.638 Sum of "not power of 2"
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-14 04:27:27 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 1,000 ms |
| コード長 | 269 bytes |
| コンパイル時間 | 312 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-07-22 10:31:20 |
| 合計ジャッジ時間 | 1,607 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 |
ソースコード
n = int(input())
p = set()
for i in range(64):
p.add(2**i)
if n in [1, 2, 3, 4, 5, 7]:
print(-1)
else:
for i in range(3, n // 2 + 2):
if i not in p:
m = n - i
if m not in p:
print(i, m)
break