Advertisement
gruslan

shag_2019_11_2_1_otbor

Apr 1st, 2023 (edited)
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. word = input()
  2.  
  3. len_word = len(word)
  4.  
  5. out = 0
  6. for i, j in enumerate(word):
  7.     if len_word - i == int(j):
  8.         out = len_word - i
  9.         break
  10.  
  11. print(out)
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement