Skip to content

Commit 28b1a0d

Browse files
authored
Update decode_ways.py
1 parent a26370a commit 28b1a0d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

decode_ways.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf-8 -*-
1+
# coding: utf-8
22

33
class Solution:
44
# @param {string} s a string, encoded message
@@ -21,4 +21,6 @@ def numDecodings(self, s):
2121
if i < len(s) - 1:
2222
if (s[i] == '1') or ((s[i] == '2') and (s[i + 1] <= '6')):
2323
cached_nums[i] += cached_nums[i + 2]
24-
return cached_nums[0]
24+
return cached_nums[0]
25+
26+
# medium: http://lintcode.com/zh-cn/problem/decode-ways/

0 commit comments

Comments
 (0)