4005. RPN calculator

Naive分支循环数组

时间限制:2000 ms

内存限制:512 MiB

题面

Extend the program for reverse polish notation calculator to add the modulus (%) operator and provisions for negative numbers.

See also Exercise 4-3 in the textbook.

样例

输入

6 7 * 5 -

输出

37