Inaho is given a function:
Given
Input Specification
The first line will contain two integers,
The second line will contain
Output Specification
Print
Subtasks
Subtask 1 [10%]
Subtask 2 [30%]
Subtask 3 [60%]
No additional constraints.
Sample Input 1
Copy
2 5
1 1
Sample Output 1
Copy
5
Sample Input 2
Copy
6 90000
4 2 29 5 1 10
Sample Output 2
Copy
408918679
Comments