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.
#!/bin/python3importmathimportosimportrandomimportreimportsys## Complete the 'aVeryBigSum' function below.## The function is expected to return a LONG_INTEGER.# The function accepts LONG_INTEGER_ARRAY ar as parameter.#defaVeryBigSum(ar):# Write your code herelongIntegerArray=0foriinrange(len(ar)):longIntegerArray+=ar[i]print(ar)print(longIntegerArray)returnlongIntegerArrayif__name__=='__main__':fptr=open(os.environ['OUTPUT_PATH'],'w')ar_count=int(input().strip())ar=list(map(int,input().rstrip().split()))result=aVeryBigSum(ar)fptr.write(str(result)+'\n')fptr.close()
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
A Very Big Sum
You are viewing a single comment's thread. Return to all comments →