MWC '15 #1 P1: Playlist Panic
View as PDF likes to listen to various songs in his music playlist, especially by Young Thug. Specifically, his playlist contains  
 songs. However, being extremely busy, he does not have a lot of time to listen to music.
Each song takes a certain amount of time to listen to, specifically  
 minutes and 
 
 seconds.
If  has  
 minutes and 
 
 seconds to listen to music today, what is the maximum number of songs he can listen to?
Input Specification
The first line contains one integer, , specifying the number of songs in the playlist.
The next  lines each have two space separated integers, 
 and 
, specifying the time it takes to listen to the 
 song in minutes and seconds.
The last line of input contains two space separated integers,  and 
, representing the time that  has to listen to his playlist. 
 represents the amount of time in minutes and 
 represents the time in seconds.
Output Specification
The output should consist of one integer representing the maximum number of songs that can be listened to.
Sample Input
5
1 30
2 45
4 90
0 10
14 2
9 44
Sample Output
3
Explanation for Sample Output
The 1st, 2nd and 4th songs can be played in the given time.
Comments
can anyone help me? i can't pass test cases 1, 2, and 6
You're multiplying minutes by 100. This means that a test case that looks like this:
1
0 61
1 0
would result in WA
may anyone check my code i am unsure why i am getting a ValueError rn, if you can thx!
free(Young Thug);
Congrats to the person who did the question in Assembly x64
If
 and 
 is bigger than the sum of all the numbers does the playlist loop back around?
Who has a song that's 10 seconds long?
I have one: https://www.youtube.com/watch?v=8zqSSJSQlWo