結果
| 問題 | No.638 Sum of "not power of 2" |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-02-23 09:41:48 |
| 言語 | Python3 (3.14.3 + numpy 2.4.2 + scipy 1.17.0) |
| 結果 |
AC
|
| 実行時間 | 139 ms / 1,000 ms |
| コード長 | 270 bytes |
| 記録 | |
| コンパイル時間 | 490 ms |
| コンパイル使用メモリ | 20,952 KB |
| 実行使用メモリ | 15,488 KB |
| 最終ジャッジ日時 | 2026-02-23 11:42:12 |
| 合計ジャッジ時間 | 3,299 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 |
ソースコード
def check(x):
while x != 1:
if x % 2 == 1:
return False
x //= 2
return True
n = int(input())
for i in range(3, min(n, 10)):
if not check(i) and not check(n - i):
print(f"{i} {n - i}")
break
else:
print("-1")