summary refs log tree commit diff stats
path: root/day23.c
diff options
context:
space:
mode:
Diffstat (limited to 'day23.c')
-rw-r--r--day23.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/day23.c b/day23.c
new file mode 100644
index 0000000..9622fdc
--- /dev/null
+++ b/day23.c
@@ -0,0 +1,22 @@
+#include <stdio.h>
+// decompiled assembly from the original problem specification
+int main() {
+    int b = 81;
+    int c = b;
+    int h = 0;
+    b = 100 * b + 100000;
+    c = b + 17000;
+    for (; b<= c; b += 17) {
+        int d = 2;
+        while (d != b) {
+            if (b % d == 0) {
+                ++h;
+                d = b;
+            } else {
+                ++d;
+            }
+        }
+    }
+    printf("%d", h);
+    return 0;
+}
\ No newline at end of file