逆波兰表达式
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Description
逆波兰表达式是一种把运算符前置的算术表达式,例如普通的表达式2 + 3的逆波兰表示法为+ 2 3。逆波兰表达式的优点是运算符之间不必有优先级关系,也不必用括号改变运算次序,例如(2 + 3) \* 4的逆波兰表示法为\* + 2 3 4。本题求解逆波兰表达式的值,其中运算符包括+ - \* /四个。
## Input Format
输入为一行,其中运算符和运算数之间都用空格分隔,运算数是浮点数。
## Output Format
输出为一行,表达式的值。
可直接用printf("%f\\n", v)输出表达式的值v。
```input1 \* + 11.0 12.0 + 24.0 35.0
```output1
1357.000000
2026-5-16递归练习
- Status
- Done
- Rule
- XCPC
- Problem
- 9
- Start at
- 2026-5-16 13:30
- End at
- 2026-5-16 16:30
- Duration
- 3 hour(s)
- Host
- Partic.
- 4