summary refs log tree commit diff stats
path: root/day23.c
blob: 9622fdcbc509c076e85dec664f05207b07c00ef4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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;
}