Skip to content

Commit

Permalink
adding more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
codeperfectplus committed Oct 4, 2021
1 parent b616ac6 commit 991dc09
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions 04. AVeryBigSum/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,9 @@
def aVeryBigSum(ar):
return sum(ar)

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()
assert aVeryBigSum([1000000001, 1000000002, 1000000003, 1000000004, 1000000005]) == 5000000015
assert aVeryBigSum([1, 2, 3, 4, 5]) == 15
assert aVeryBigSum([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 55

'''
the range is 0 through 4,294,967,295 (232 − 1) for representation as an (unsigned) binary number, and −2,147,483,648 (−231) through 2,147,483,647 (231 − 1) for representation as two's complement.
Expand Down

0 comments on commit 991dc09

Please sign in to comment.