Advertisement
GracieKyla

Untitled

Jan 21st, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. ТРЕТЬЕ==============
  2. n = int(input())
  3. A = []
  4. a = 0
  5. for i in range(n):
  6.     word = input()
  7.     for elem in word:
  8.         if elem.isdigit():
  9.             pass
  10.         else:
  11.             word = word.replace(elem, ' ')
  12.     A.append(word.split(' '))
  13. for elem in A:
  14.     for el in elem:
  15.         if el != '':
  16.             a += int(el)
  17. print(a)
  18.  
  19.  
  20. ЧЕТВЕРТОЕ======================
  21. n = int(input())
  22. a = []
  23. count = 0
  24. for m in range(n):
  25.     count += 1
  26.     word = input()
  27.     for el in word:
  28.         print(chr(ord(el) + count), end='')
  29.     print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement