n = int(input())
val = {
'A': 4,
'K': 3,
'Q': 2,
'J': 1
}
tot = 0
for i in range(n):
s = input()
for c in s:
if c in val:
tot += val[c]
print(tot)
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
2904 KB |
Output is correct |
2 |
Correct |
10 ms |
2908 KB |
Output is correct |
3 |
Correct |
10 ms |
2812 KB |
Output is correct |
4 |
Correct |
10 ms |
2908 KB |
Output is correct |
5 |
Correct |
10 ms |
2888 KB |
Output is correct |
6 |
Correct |
10 ms |
2908 KB |
Output is correct |
7 |
Correct |
11 ms |
2908 KB |
Output is correct |
8 |
Correct |
18 ms |
2908 KB |
Output is correct |
9 |
Correct |
17 ms |
2908 KB |
Output is correct |
10 |
Correct |
22 ms |
2904 KB |
Output is correct |