P28243 [洛谷] ccj and zrz on the Way Home
普及+
题目描述

Problem Background

zrz is walking home when suddenly he feels the urge to use the restroom. He rushes to the restroom door and is surprised to find a mathematical equation on it.

Problem Description

Given a mathematical equation (a*b=c, a/b=c, a+b=c, or a-b=c) where a, b, and c are three numbers, but one of them is a question mark, indicating an unknown value. Your task is to determine the unknown value.

Input Format

A single line containing a mathematical equation (a*b=c, a/b=c, a+b=c, or a-b=c) with possible extra spaces.

Output Format

The number represented by the "?" symbol, rounded to two decimal places.

Sample Input and Output

Sample Input #1

1+1    =                     ?

Sample Output #1

2.00

Sample Input #2

1-?                     =0

Sample Output #2

1.00

Sample Input #3

2*?=                         6

Sample Output #3

3.00

Sample Input #4

8/5=?

Sample Output #4

1.60

Notes

The total length of the input is less than 200. All numbers and the required number will not exceed 1,000,000,000 and will not be negative. The input numbers will not be decimals, but the answer may be.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
1+1 = ?
样例输出
2.00