From bac161865fc1c46438bef3c5bf7ccd33fde2977c Mon Sep 17 00:00:00 2001 From: Keith Stanley <46853837+iamstan13y@users.noreply.github.com> Date: Sat, 1 Jan 2022 01:52:03 +0200 Subject: [PATCH] Deja Vu - Python Implementation. --- Sololearn CodeCoach Challenges/Python/DejaVu.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Sololearn CodeCoach Challenges/Python/DejaVu.py diff --git a/Sololearn CodeCoach Challenges/Python/DejaVu.py b/Sololearn CodeCoach Challenges/Python/DejaVu.py new file mode 100644 index 0000000..6abc538 --- /dev/null +++ b/Sololearn CodeCoach Challenges/Python/DejaVu.py @@ -0,0 +1,11 @@ +s = input() +c = 0 +for l in s: + if s.count(l) > 1: + c += s.count(l) + +c -= int(c/2) +if c > 1: + print('Deja Vu') +else: + print('Unique')