結果
| 問題 | No.638 Sum of "not power of 2" |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-11-14 13:27:57 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 246 bytes |
| 記録 | |
| コンパイル時間 | 58 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 241,280 KB |
| 最終ジャッジ日時 | 2026-10-07 07:50:33 |
| 合計ジャッジ時間 | 5,857 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | AC * 8 TLE * 1 -- * 3 |
ソースコード
n = int(input())
nl = [2**i for i in range(int(n**0.5)+1)]
l = []
for i in range(1, n):
x = i
y = n - i
if not x in nl and not y in nl:
l.append(x)
l = sorted(l)
if len(l) == 0:
print(-1)
else:
print(l[0], n - l[0])