From 1927e3b00961a2a006159610eb5aaf973a793916 Mon Sep 17 00:00:00 2001 From: daviddoji Date: Wed, 21 Sep 2022 20:47:12 +0200 Subject: [PATCH] Adopted new convention from template --- src/Python/Problems001-050/Problem010.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Python/Problems001-050/Problem010.py b/src/Python/Problems001-050/Problem010.py index b1b39f3..ca8f7dc 100644 --- a/src/Python/Problems001-050/Problem010.py +++ b/src/Python/Problems001-050/Problem010.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python """ Created on 26 Aug 2017 @@ -9,8 +9,7 @@ Solution for problem 10 of Project Euler https://projecteuler.net/problem=10 """ -import math -from utils import timeit, list_primes +from utils import list_primes, timeit @timeit("Problem 10") @@ -20,11 +19,11 @@ def compute(): Find the sum of all the primes below two million. """ + ans = sum(list_primes(1_999_999)) return ans if __name__ == "__main__": - - print(f"Result for Problem 10: {compute()}") \ No newline at end of file + print(f"Result for Problem 10 is {compute()}")