Terminator - Genisys
Time Limit: 1 sec
The Problem
Kyle Reese, father of John Conner is now in 2016 after a long way back from the future. John Conner is the only one who can destroy the machines and can free all the humanity. Everyone knows his fearless moves against terminators. But the machines won't stop. They have sent a terminator back through the time to kill John Connor's mom Sarah Connor, so that John Connor never gets born. Kyle Reese is one of the soldiers of John Conner, he got on the time machine to be with Sarah Conner and to protect her. For this he needs to get back in 1984. But for the interruptions in time machine he has wrong landed in 2016. He has to go back to save the world. Without you it can never be possible. Kyle can fix the time machine. All you have to do is writing a bug free code that will test if the time machine is working fine. Please, don’t let the world die. If your code gives wrong info Kyle will be lost in time track, and all the humanity will die with him.
Kyle has given you a note from John.
* January, March, May, July, August, October and December have 31 days.
* February has 28 days. But a leap year's February has 29 days.
* The rest months have 30 days.
The Input
Input is a date displayed on the time machine's screen. The date is in the format DD/MM/YYYY. Program will have several test cases. Input is terminated by EOF.
The Output
Output will be a single line displaying "Hail Humanity!" if the date is valid, otherwise the output is "Humanity is doomed!!".
Sample Input
29/02/2016
29/02/2017
31/04/1980
10/01/2070
Sample Output
Hail Humanity!
Humanity is doomed!!
Humanity is doomed!!
Hail Humanity!
[College Level]
1st Online Programming Contest 2016 by Outsbook
Problem Setter: Saiful Islam Niloy