This commit is contained in:
2023-07-18 21:51:43 +02:00
parent 0d0ebece77
commit db736b30b3

23
ptice.py Normal file
View File

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