SHARE
TWEET

Untitled

a guest Jan 21st, 2020 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. s = str(input())
  2.  
  3. letters=[]
  4. for i in range(1,34):
  5.     letters.append(str(i))
  6.  
  7. def num(s):
  8.     if len(s)<=1:
  9.         return 1
  10.     else:
  11.         l = s[0:2]
  12.         if l in letters:
  13.             return num(s[1:])+num(s[2:])
  14.         l=l[0]
  15.         if l in letters:
  16.             return num(s[1:])
  17.         return num(s[1:])
  18.            
  19. print(num(s))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top