Woburn Challenge 2018-19 Round 1 - Junior Division
Alice is a student at H.S. High School. Right now, she's not the happiest student in the world, as she has a whole bunch of math homework due tomorrow!
Her homework consists of math questions, which Alice is supposed to complete one after another. Each question takes minutes to complete.
As important as Alice's homework is, she's had some more important shows
to watch first, leaving her with only minutes
now remaining before her strict bedtime! She'd like to figure out
whether she can complete all homework questions within at most
minutes, or if they would require a combined total of strictly more than
minutes (in which case she'll use that time to come up with an
excuse instead). Output Y
if she still has time to
finish her homework today, or N
if she doesn't.
Input Specification
The first line of input consists of a single integer, .
The next line consists of a single integer, .
The next line consists of a single integer, .
Output Specification
Output a single character, either Y
if Alice can complete all
assignments within at most minutes, or N
otherwise.
Sample Input 1
2
3
9
Sample Output 1
Y
Sample Input 2
4
3
11
Sample Output 2
N
Sample Explanation
In the first case, the 2 assignments would require a total of 6 minutes, which is less than or equal to 9, meaning that Alice has time to complete them.
In the second case, the 4 assignments would require a total of 12 minutes, which is greater than 11, meaning that Alice won't have time to complete them.
Comments