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 English
, Chemistry
, Math
, 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
Sample Input
Copy
3 6
Math
TOK
English
Sample Output
Copy
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.