summaryrefslogtreecommitdiff
path: root/day1/exercise/x.py
diff options
context:
space:
mode:
Diffstat (limited to 'day1/exercise/x.py')
-rw-r--r--day1/exercise/x.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/day1/exercise/x.py b/day1/exercise/x.py
new file mode 100644
index 0000000..0b073db
--- /dev/null
+++ b/day1/exercise/x.py
@@ -0,0 +1,19 @@
+d1 = [2,4,6,8]
+d0 = [0,2,4,6,8]
+dq = [0, 4, 6]
+
+for a in d1:
+ th = a * 1000
+ for b in d0:
+ hu = b * 100
+ for c in d0:
+ te = c * 10
+ for u in dq:
+ n = th + hu + te + u
+ if is_square(n): print n
+
+
+for i in range(46, 94, 2):
+ n = i * i
+ if all_even( n ): print n
+