#P7533. [COCI 2016/2017 #4] Bridž
[COCI 2016/2017 #4] Bridž
Description
Mirko invented a card game. The cards only include and . Their scores are , respectively.
Given decks, each containing cards, find the total score of all cards in these decks.
Input Format
The first line contains an integer .
The next lines each contain a string of length . The string only contains the characters .
Output Format
Output the total score of all cards.
1
AKXAKJXXXAXAQ
25
4
XXXAXXXXXXJXX
KXAXXXQJAXXXX
AQKQXXXKXXKQX
JXXXXXJXXXXXX
40
Hint
[Sample 1 Explanation]
| Card Type | Number of Cards | Score per Card | Total Score |
|---|---|---|---|
Therefore, the total score is .
[Constraints]
For of the testdata, .
[Notes]
This problem is translated from COCI 2016-2017 CONTEST #4 T1 Bridž.
The scoring of this problem follows the original COCI problem settings, with a full score of .
Translated by ChatGPT 5
京公网安备 11011102002149号