#P2715. ccj与zrz之在回家的路上

ccj与zrz之在回家的路上

Description

Given an expression (ab=ca*b=c or a/b=ca/b=c or a+b=ca+b=c or ab=ca-b=c) where aa, bb, and cc are three numbers, but one of them is a question mark '?', meaning unknown, please find the unknown value.

Input Format

A single line containing an expression (ab=ca*b=c or a/b=ca/b=c or a+b=ca+b=c or ab=ca-b=c), which may contain extra spaces.

Output Format

The number represented by '?', formatted to 2 decimal places.

1+1    =                     ?
2.00
1-?                     =0
1.00
2*?=                         6
3.00
8/5=?
1.60

Hint

The total length is less than 200. All numbers and the required number will not exceed 1000000000, and none are negative. The input numbers are integers (not decimals), but the answer may be a decimal.

Translated by ChatGPT 5