mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-28 07:21:07 +00:00
Add a soution of ProjectEuler Problem 13
This commit is contained in:
parent
dc5c5768e0
commit
20a4577903
13
Project Euler/Problem 13/sol1.py
Normal file
13
Project Euler/Problem 13/sol1.py
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
'''
|
||||||
|
Problem Statement:
|
||||||
|
Work out the first ten digits of the sum of the N 50-digit numbers.
|
||||||
|
'''
|
||||||
|
|
||||||
|
n = int(input().strip())
|
||||||
|
|
||||||
|
array = []
|
||||||
|
for i in range(n):
|
||||||
|
array.append(int(input().strip()))
|
||||||
|
|
||||||
|
print(str(sum(array))[:10])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user