We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
for i in range(int(N[0])):
print('.............',int(N[0]))
n=input('e:').split()
elements=list(map(int,n))
print(max(elements))
function=function+max(elements)**2
print(function)
print(function%int(N[1]))
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Maximize It!
You are viewing a single comment's thread. Return to all comments →
N=input('n:').split() function=0
for i in range(int(N[0])): print('.............',int(N[0])) n=input('e:').split() elements=list(map(int,n)) print(max(elements)) function=function+max(elements)**2 print(function)
print(function%int(N[1]))