PlayStation interview question

Basic Calculator III question in LeetCode.