1082: 加减互换计算

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:147 Solved:62

Description

输入n个小于等于1000的正整数,从后向前通过加法和减法的互换,计算出值。
例如:
6
5 4 3 6 7 8
输出:
8+7-6+3-4+5=13

Input

第一行,n个数,
第二行,n个正整数。

Output

一行,计算过程和答案。

Sample Input Copy

6
5 4 3 6 7 8

Sample Output Copy

8+7-6+3-4+5=13

HINT

1 ≤ n ≤ 1000

Source/Category