シンプルな計算機
シンプルな計算機を作れますか?
入力は1つの整数、演算子 +-*/、もう1つの整数を含みます。出力には式の結果を示す必要があります。演算子が +-*/ のいずれでもない場合、プログラムは Unsupported operation と表示するべきです。また、0による除算が発生した場合は、Cannot divide by 0 と表示するべきです。
入力 | 出力 |
|---|---|
2 | 4 |
2 | Cannot divide by 0 |
Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB