Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- books = []
- count = 0
- with open('input.txt') as file:
- n ,v , t =[int(i) for i in file.readline().split()]
- for i in range(n):
- x , y = [int(i) for i in file.readline().split('-')]
- books.append(int(x)*int(y))
- books.sort()
- symbols = v*t
- for i in books:
- if symbols - i >= 0:
- count+=1
- symbols -=i
- else:
- break
- print(count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement