Browse Source

python3: add a-very-big-sum

master
lub 1 year ago
parent
commit
674de93b7a
1 changed files with 28 additions and 0 deletions
  1. +28
    -0
      python3/a-very-big-sum/__main__.py

+ 28
- 0
python3/a-very-big-sum/__main__.py View File

@@ -0,0 +1,28 @@
#!/bin/python3

import math
import os
import random
import re
import sys

# Complete the aVeryBigSum function below.
def aVeryBigSum(ar):
sum = 0
for i in ar:
sum += i
return sum

if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')

ar_count = int(input())

ar = list(map(int, input().rstrip().split()))

result = aVeryBigSum(ar)

fptr.write(str(result) + '\n')

fptr.close()

Loading…
Cancel
Save