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")