Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0638ba5

Browse files
docs: 150题添加注释
1 parent 0fa443c commit 0638ba5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎problems/0150.逆波兰表达式求值.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ class Solution(object):
200200
else:
201201
op2 = stack.pop()
202202
op1 = stack.pop()
203+
# 由题意"The division always truncates toward zero",所以使用int()可以天然取整
203204
stack.append(str(int(eval(op1 + token + op2))))
204205
return int(stack.pop())
205206
```

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /