Advertisement
Spocoman

02. Messaging

Jan 24th, 2022
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. numbers = input().split(' ')
  2. string = list(input())
  3. message = ''
  4.  
  5. for number in numbers:
  6.     num = 0
  7.     for i in range(len(number)):
  8.         num += int(number[i])
  9.     message += string[num % len(string)]
  10.     string.pop(num % len(string))
  11.  
  12. print(message)
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement