P28301 [洛谷] [NOI2003] Stick Game
提高
题目描述

Background

This is an ancient game. You are to arrange sticks on the table to form an incorrect equation, and then move exactly one stick to make the equation correct. Now it's your turn.

Problem Description

You are only allowed to move the sticks that form the digits, not the sticks that form the operators (+, -, =). Therefore, the plus sign, minus sign, and equal sign will not change. Both before and after the move, the sticks must strictly match the digits 0 through 9 as shown in Figure 2. If moving one stick can make the equation correct, output the new equation; otherwise, output "No".

Input Format

The input data must be logically consistent. The length of the string is less than or equal to 1000.

Output Format

If there is a solution, output the correct equation in the same format as the input (ending with "#", with no separators in between, and no extra characters). The input data guarantees that the solution is unique.

If there is no solution, output "No" (with N capitalized and o in lowercase).

Sample Input and Output

Sample Input #1

1+1=3#

Sample Output #1

1+1=2#

Sample Input #2

1+1=3+5#

Sample Output #2

No

Sample Input #3

11+77=34#

Sample Output #3

17+17=34#
输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
1+1=3#
样例输出
1+1=2#