Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = input()
- result = []
- for i in range(1, len(n)):
- if n[i] == n[i-1]:
- result.append(n[i])
- if len(result) > 1:
- print("False, Петя врёт")
- else:
- d = result[0]
- print(f"Загаданное число: {n.replace(d + d, d)}")
- print(f"Продублированная цифра: {d}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement