Skip to content

Commit 177de53

Browse files
authored
Update 0150-evaluate-reverse-polish-notation.py
1 parent b0be288 commit 177de53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/0150-evaluate-reverse-polish-notation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def evalRPN(self, tokens: List[str]) -> int:
1111
stack.append(stack.pop() * stack.pop())
1212
elif c == "/":
1313
a, b = stack.pop(), stack.pop()
14-
stack.append(int(b / a))
14+
stack.append(int(float(b) / a))
1515
else:
1616
stack.append(int(c))
1717
return stack[0]

0 commit comments

Comments
 (0)