summaryrefslogtreecommitdiff
path: root/2020/01/bin/first
diff options
context:
space:
mode:
Diffstat (limited to '2020/01/bin/first')
-rwxr-xr-x2020/01/bin/first14
1 files changed, 14 insertions, 0 deletions
diff --git a/2020/01/bin/first b/2020/01/bin/first
new file mode 100755
index 0000000..aa340d5
--- /dev/null
+++ b/2020/01/bin/first
@@ -0,0 +1,14 @@
+#!/usr/bin/env raku
+
+unit sub MAIN ();
+
+my @input = $*PROGRAM.parent(2).add('resources/first.txt').lines;
+
+for @input X @input -> ($a, $b) {
+ next if $a == $b;
+ next unless ($a + $b) == 2020;
+
+ say $a × $b;
+
+ return
+}