scientific_comp_projects/CODE/[python]kattis/trivial/bela.py
2021-10-29 15:16:40 +02:00

28 lines
555 B
Python

n = input()
n, b = n.split(' ')
n = 4*int(n)
score = 0
for i in range(n):
j = input()
cart = j[0]
suit = j[1]
if cart == 'A' :
score = score + 11
elif cart == 'K' :
score = score + 4
elif cart == 'Q' :
score = score + 3
elif cart == 'T' :
score = score + 10
elif suit == b :
if cart == 'J' :
score = score + 20
elif cart == '9':
score = score + 14
elif suit != b :
if cart == 'J' :
score = score + 2
print(score)