blob: 8d21121410bd5f7277fac2837f77fcd7b7d64429 (
plain)
1
2
3
4
5
6
7
8
9
10
|
import math as mt
def get_Position(a,n,m):
for i in range(n):
a[i] = (a[i] // m + (a[i] % m != 0))
result,maxx = -1,-1
for i in range(n - 1,-1,-1):
if (maxx < a[i]):
maxx = a[i]
result = i
return result + 1
|