← 返回 uber 的题目列表Basic Calculator II
类型:online_judge
Problem: Basic Calculator II
Given a string expression s, evaluate its value.
The expression contains only:
non-negative integers
operators +, -, *, /
spaces
Integer division should truncate toward zero.
You may assume the expression is always valid and all intermediate and final results fit in a 32-bit signed integer.
Input Format
One line: string s, the expression.
Output Format
Print one integer, the evaluated result.
Constraints
1 <= len(s) <= 3 * 10^5
Example
Input:
3+2*2
Output:
7
Example
Input
3+2*2
Output
7