Marking Assignments
You are the Chief Examiner of a unit and you have t assignments that are needed to be marked. You have n TAs which mark assignments in parallel. The i-th TA can mark an assignmnt every si minutes. What is the minimum amount of time that it will take to mark all assignments?
Input
The first line will contain integers n and t. The number of TAs and number of assignments to mark, respectively. The second line contains n integers, s1,…,sn, the time it takes for each TA to mark 1 assignment.
Output
Output the minimum time needed to mark every assignment.
Constraints
- 1≤n≤105
- 1≤t,si≤109
Example 1
10 123
7 7 4 6 3 8 9 8 5 1
49
Example 2
10 63
8 10 4 6 3 6 9 8 4 5
36
Comments0
No comments yet
Be the first to comment.
New comment
Log in to join the discussion.