Back From Summer '17 P1: Pithy Pastimes

View as PDF

Submit solution


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

Author:
Problem type
Chalk Board

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 chalkboard 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 (1 \le N \le 10\,000), the number of students in your class. This will then be followed by a line of N 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 chalkboard 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 of 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

Comments


  • 0
    justinnova0915  commented on Dec. 10, 2024, 2:38 a.m.

    wdym? I always protest after school, it's my favorite thing to do!


  • 0
    Danielzhurandomguy  commented on Feb. 10, 2023, 12:20 a.m.

    no philosiphy? ayo?


  • 0
    oscarhuang885  commented on Jan. 21, 2023, 12:40 p.m.

    Why is one of the hobbies say protesting? Just wondering.


  • 2
    Payne  commented on Oct. 8, 2022, 9:56 p.m.

    so... why does every word start with a p? lmao