diff --git a/problems/0150.逆波兰表达式求值.md b/problems/0150.逆波兰表达式求值.md index 4ffe950b..5fb28c29 100644 --- a/problems/0150.逆波兰表达式求值.md +++ b/problems/0150.逆波兰表达式求值.md @@ -200,6 +200,7 @@ class Solution(object): else: op2 = stack.pop() op1 = stack.pop() + # 由题意"The division always truncates toward zero",所以使用int()可以天然取整 stack.append(str(int(eval(op1 + token + op2)))) return int(stack.pop()) ```