While studying after school, Ace always needs Ramen to keep himself energized. For different courses, Ace needs different numbers of bowls of Ramen to be able to study them. For TOK
, he needs bowl, for English
, , for Chemistry
, , and for Math
, . Ace always strives to study as many subjects a day as possible, and he only has bowls of Ramen at home. For tonight, Ace has to study for courses. He needs your help to figure out whether or not he has enough bowls or not. If Ace has enough bowls of Ramen, output YEA BOI
. If he doesn't, output Go to Metro
and the maximum number of courses he can finish with his current supply of Ramen on a new line.
Input Specification
Line 1: integers ,
Next lines: Courses Ace must study for (TOK, English, Math, and Chem)
Sample Input
3 6
Math
TOK
English
Sample Output
Go to Metro
2
Comments
No wonder Ace asked us to help figure this problem out for him, he's probably going to go eat 4 bowls of ramen.
Out of curiosity why does adding
Change the output the program gives
https://dmoj.ca/submission/2074623
sys.stdin.readline
does not strip the trailing newline, whileinput
does. If you manually strip away the trailing newline, your submission will AC.Damn this dude TimothyW553 has the exact same answer as nathanl3.