結果
| 問題 | No.638 Sum of "not power of 2" |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-02-23 09:41:48 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 92 ms / 1,000 ms |
| + 606µs | |
| コード長 | 270 bytes |
| 記録 | |
| コンパイル時間 | 651 ms |
| コンパイル使用メモリ | 21,536 KB |
| 実行使用メモリ | 15,868 KB |
| 最終ジャッジ日時 | 2026-07-23 18:59:34 |
| 合計ジャッジ時間 | 3,028 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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")