Jittered Points With stripplot
The Ravensworth Group scores every job it completes and files the score against the team that did it, teams being labelled by single letters. The review chart shows every individual score as its own dot rather than a team average, nudged sideways so that scores landing on the same number do not hide behind one another. Team A's manager wants the count of dots in her column stated in the notes.
Task: Print how many records belong to team A.
Input
The first line holds one integer n, the number of records, where 1 <= n <= 1000. Then come n lines, each holding a team label and a score separated by a single space. Team labels contain no spaces. Team A may have no records at all.
Output
One line holding a whole number: how many records carry the label A. Every record counts separately, including two that scored the same. Print 0 if team A filed nothing.
Example:
Input:
4
A 10
B 20
A 30
A 5
Output:
3
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in