DWITE '10 R1 #1 - Age Gate

View as PDF

Submit solution

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

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig
DWITE Online Computer Programming Contest, October 2010, Problem 1

DWITE has traditionally been a high school level contest, so to ensure that no middle schoolers try to sneak in and make older students feel uncomfortable, an age gate is being considered.

The input will contain 5 lines, each having 3 integers representing a person's birth date, in a form of DD MM YYYY (separated by spaces). You may assume that a person is not born on February 29th.

The output will contain 5 lines, decisions if the participant is at least 13 years old as of today (27 10 2010) or not. Print old enough or too young depending on the age.

Use the age system where a user's age increases on their birthday. Therefore, a person who was born on October 27th, 1997 would be 12 years old on October 26th, 2010, but 13 years old on October 27th, 2010.

Sample Input

28 10 1997
27 10 1997
26 11 1997

Sample Output

too young
old enough
too young

Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) Problem Resource: DWITE


Comments

There are no comments at the moment.