djfz-2020-s444399/TaskD00/run
Kijowski Michał 99dac181e4 nhjhhjjhirgre
2020-12-04 12:27:35 +01:00

15 lines
340 B
Python
Executable File

#!/usr/bin/python3
import sys
import re
for input in sys.stdin.readlines():
answer = re.findall('[0-9]{4}',input)
if answer:
spewuenic = input[:-1]
for num in answer:
spewuenic = re.sub(num, chr(ord(num[0])+49)+chr(ord(num[1])+49)+chr(ord(num[2])+49)+chr(ord(num[3])+49), spewuenic)
print(spewuenic)
else:
print(input[:-1])