完整代码
s = input() n = len(s) x_1 = 1 for i in range(n): if i == 0: x_2 = 1 else: if int(s[i - 1: i + 1]) <= 26: x_1, x_2 = x_2, x_1 + x_2 else: x_1 = x_2 print(x_2)
s = input() n = len(s) x_1 = 1 for i in range(n): if i == 0: x_2 = 1 else: if int(s[i - 1: i + 1]) <= 26: x_1, x_2 = x_2, x_1 + x_2 else: x_1 = x_2 print(x_2)