Work out the first ten digits of the sum of the one-hundred 50-digit numbers.
1 2 3 4 5 6 7 | f = open('Problem 13 numbers.txt', 'r') numbers = f.readlines() sum = 0 for num in numbers: sum = sum + int(num) print sum |
Work out the first ten digits of the sum of the one-hundred 50-digit numbers.
1 2 3 4 5 6 7 | f = open('Problem 13 numbers.txt', 'r') numbers = f.readlines() sum = 0 for num in numbers: sum = sum + int(num) print sum |
You must be logged in to post a comment.