Marking Assignments

View as PDF

Submit solution

Points: 100
Time limit: 2.0s
Python 3 10.0s
Memory limit: 977M

Author:
Problem type

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

  • 1n105
  • 1t,si109

Example 1

Input
Copy
10 123
7 7 4 6 3 8 9 8 5 1
Output
Copy
49

Example 2

Input
Copy
10 63
8 10 4 6 3 6 9 8 4 5
Output
Copy
36

Comments

There are no comments at the moment.