Back From Summer '17 P1: Pithy Passtimes

View as PDF

Points: 3
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

As you step into your school after a long summer break, you take a deep breath.

New experiences. Friends. Knowledge. All of these and more await as you come back to your educational institute.

Your first class is English, and your teacher, Joey, is new to your school. To familiarize himself with his new students, Joey creates an icebreaker; he will ask each student for their favorite hobbies. He then proceeds to create a list on the chalk board composed out of these activities (note: repeats are included).

What you find out soon is that your new teacher is extremely lazy, and when he hears one of the students call out a hobby that is strictly longer than 10 characters, he just nods instead of writing it down and moves on to the next student.

Given the hobbies that each student in your class tells Joey, how many will be on the board by the end of the ice breaker?

Input Specification

The first line will contain an integer , the number of students in your class. This will then be followed by a line of words that represent the hobbies called out by the students.

Output Specification

The only output is an integer representing the number of hobbies on the chalk board once all the students have said theirs.

Sample Input 1

5
Piano Programming Pottery Protesting Pen-spinning

Sample Output 1

3

Explanation for Sample Output 1

For the first example (seen in the picture above), Piano (5 characters), Pottery (7 characters), and Protesting (10 characters) are all written down, whereas Programming (11 characters) and Pen-spinning (12 characters) are not as they are over 10 characters long.

Sample Input 2

3
Photography Photography Photography

Sample Output 2

0

Explanation for Sample Output 2

The second example sure does have a lot students who enjoy photography! But as this hobby is 11 characters long, it is never written down.

Sample Input 3

8
Paintball Parkour Poker Philately Poker Puzzles Puzzles Photography

Sample Output 3

7