Ptice
This commit is contained in:
23
ptice.py
Normal file
23
ptice.py
Normal 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")
|
||||
Reference in New Issue
Block a user