diff options
author | Adam Spragg <adam@spra.gg> | 2023-01-29 16:19:35 +0000 |
---|---|---|
committer | Adam Spragg <adam@spra.gg> | 2023-01-30 19:07:53 +0000 |
commit | 5c8e1d84d998449bb590bce60566594e1c7012da (patch) | |
tree | 2e58d6599dc9926d72bda97175673be0d2834eff /19.c | |
parent | b43bdf75540c9daab5c94317bf910d0eba3755ab (diff) |
Puzzle 19: Make geode product an unsigned long.
Because it can never be negative, and some of the blueprint combinations
can cause it to wrap. This gives us one more factor of two breathing
room.
Diffstat (limited to '19.c')
-rw-r--r-- | 19.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -322,7 +322,7 @@ main(int argc, char ** argv) int debug = 0, rounds = 24; char const * build = "exhaustive", * output = "quality"; int quality = 0, i; - long product = 1; + unsigned long product = 1; regex_t reblueprint; char buf[BUFSIZ]; @@ -427,7 +427,7 @@ main(int argc, char ** argv) printf("Total quality level = %d\n", quality); } else if (strcmp(output, "product") == 0) { - printf("Total geode product = %ld\n", product); + printf("Total geode product = %lu\n", product); } else { fprintf(stderr, "Unknown output type: %s\n", output); |