From db736b30b37e363d007e632d1b64af1582586ad2 Mon Sep 17 00:00:00 2001 From: Jethro Stapelbroek Date: Tue, 18 Jul 2023 21:51:43 +0200 Subject: [PATCH] Ptice --- ptice.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 ptice.py diff --git a/ptice.py b/ptice.py new file mode 100644 index 0000000..efcefff --- /dev/null +++ b/ptice.py @@ -0,0 +1,23 @@ +ADRIAN = "ABC" * 34 +BRUNO = "BABC" * 25 +GORAN = "CCAABB" * 17 + +n = int(input()) +answers = input() +adrian_score = bruno_score = goran_score = 0 +for i in range(n): + if answers[i] == ADRIAN[i]: + adrian_score += 1 + if answers[i] == BRUNO[i]: + bruno_score += 1 + if answers[i] == GORAN[i]: + goran_score += 1 + +max_score = max((adrian_score, bruno_score, goran_score)) +print(max_score) +if adrian_score == max_score: + print("Adrian") +if bruno_score == max_score: + print("Bruno") +if goran_score == max_score: + print("Goran")