cswork / OA打开练习工作台

PinterestOA #6

Minimize Expression with Parentheses

估计中等评测数据准备中,可先阅读题面

考点(AI 标注)字符串回溯枚举

You are given a string expression</

Example 1

Input:

expression = "1639+5628"

Output:

"16(39+5)628"

Explanation: Placing the parentheses around 39+5 gives the minimum value among all valid choices for this expression.