Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/python3
- import os
- import sys
- #
- # Complete the simpleArraySum function below.
- #
- def simpleArraySum(ar):
- # Write your code here.
- #
- total = 0
- for x in ar:
- total = total + x
- return total
- if __name__ == '__main__':
- fptr = open(os.environ['OUTPUT_PATH'], 'w')
- ar_count = int(input())
- ar = list(map(int, input().rstrip().split()))
- result = simpleArraySum(ar)
- fptr.write(str(result) + '\n')
- fptr.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement