Files
kattis/stickykeys.py
2023-06-26 23:09:43 +02:00

8 lines
163 B
Python

s = input().strip()
for c in range(ord("0"), ord("z") + 1):
sc = chr(c)
dc = f"{chr(c)}{chr(c)}"
while dc in s:
s = s.replace(dc, sc)
print(s)