calculator - bradendubois/competitive-programming GitHub Wiki

Calculator

ID: calculator

Difficulty: 3.2

CPU Time: 1 second

Memory: 1024 MB

Solution

For this, one could build something like a stack-based interpreter to process each line, but knowing something quicker, such as Python's eval function, along with output-formatting to specify the two decimals of precision can make a problem like this extremely easy.