CSPC '15 #1 - The Card Game

View as PDF

Submit solution

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

Author:
Problem type

Wylie Coyote (Crescent's mascot) is very excited to play a new card game called The Yekkee. The Yekkee is a game which can be played by exactly 12 players who all must be over 14 years of age.

Your task is to write a program that determines if too many people want to play the game along with how many are too young to play.

Input Specification

The first line of input will contain the single integer M (1 \le M \le 30), the number of people who want to play. The next M lines will each contain a single integer A_i (-40 \le A_i \le 10^6), denoting the age of the i^\text{th} person. A negative age should be interpreted as a player who has decided not to play, and should be ignored.

Output Specification

The first line of output should be: X people are too young to play. Do not print the first line if 0 people are too young to play, where X represents the number of kids who are too young. Where there is only 1 person who is too young, you should output 1 person is too young to play.

The second line of output should be either There are too many people who want to play. or There are not enough people to play. depending on whether there are too few or too many. If there are exactly 12 who can play, print Time to play!

Sample Input

5
4
3
-2
1
9

Sample Output

4 people are too young to play.
There are not enough people to play.

Explanation

5 people initially wanted to play. 1 person decided not to play.


Comments


  • 0
    theveggie  commented on Feb. 24, 2015, 8:53 p.m.

    what if they are all old enough


    • 0
      Anix55  commented on Oct. 21, 2015, 3:49 a.m. edited

      Then you don't output the line.

      Then depending on how many people wanted to play you can say whether there are enough or not.