From 20a45779034e97eaee7830b15ef6247528f01300 Mon Sep 17 00:00:00 2001 From: bT-53 Date: Fri, 27 Oct 2017 09:19:58 +0700 Subject: [PATCH] Add a soution of ProjectEuler Problem 13 --- Project Euler/Problem 13/sol1.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Project Euler/Problem 13/sol1.py diff --git a/Project Euler/Problem 13/sol1.py b/Project Euler/Problem 13/sol1.py new file mode 100644 index 000000000..db8ddce4d --- /dev/null +++ b/Project Euler/Problem 13/sol1.py @@ -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]) +