From 2a0b0f1ca078ea530663c37a68a0ebc8279f4413 Mon Sep 17 00:00:00 2001 From: Philippe Zwietering Date: Sat, 28 Mar 2020 03:09:13 +0100 Subject: [PATCH] Started on project Euler, finished ass 1 in the most ugly way --- 1/main.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 1/main.py diff --git a/1/main.py b/1/main.py new file mode 100644 index 0000000..82d373a --- /dev/null +++ b/1/main.py @@ -0,0 +1,16 @@ +import os + + +threes = set() +fives = set() + +for x in range(334): + threes.add(3*x) + +for x in range(200): + fives.add(5*x) + + +threesfives = threes.union(fives) + +print(sum(threesfives)) \ No newline at end of file