We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0be288 commit 177de53Copy full SHA for 177de53
python/0150-evaluate-reverse-polish-notation.py
@@ -11,7 +11,7 @@ def evalRPN(self, tokens: List[str]) -> int:
11
stack.append(stack.pop() * stack.pop())
12
elif c == "/":
13
a, b = stack.pop(), stack.pop()
14
- stack.append(int(b / a))
+ stack.append(int(float(b) / a))
15
else:
16
stack.append(int(c))
17
return stack[0]
0 commit comments