Problem
Input format
The program reads from standard input a single line containing the expression. - The length of the expression is at most 200 characters. - Numbers in the expression are non-negative and have at most 9 digits. - The value of the expression and all intermediate sub-expressions fit in `long long`. - The operator `/` is integer division; the divisor is never zero.
Output format
The program prints to standard output a single integer: the value of the expression.
Example
12 * 3 + 4 - 6 / 2
37
Stuck?
Use the Get Hint button in the action bar to reveal a guided hint.
💬 Discussion
Loading...No comments yet. Be the first to start the discussion!
Sample cases (from the problem)
Sample Case 1
12 * 3 + 4 - 6 / 2
37
Solve it your way first
Community solutions unlock after you submit a passing solution. Don't peek.
Ready to solve this challenge?
Create a free account to write code, submit solutions, and track your progress.