diff --git a/04. AVeryBigSum/solution.py b/04. AVeryBigSum/solution.py index 6ff0950..6f18927 100644 --- a/04. AVeryBigSum/solution.py +++ b/04. AVeryBigSum/solution.py @@ -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.