X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=08b.c;h=a89b08f6ff65342d723d0efd55e332d75a32bd8f;hb=09f77b0ecadc0625753adfeb990142cf0c0f6735;hp=d7e05098c352f3a453dd1d92325abe6f50fe5fa0;hpb=658e79217e3c4c930c173c78518d6731f3c1c6d0;p=advent21.git diff --git a/08b.c b/08b.c index d7e0509..a89b08f 100644 --- a/08b.c +++ b/08b.c @@ -128,7 +128,7 @@ int calculate(char input[INPUT_SIZE][8], char output[OUTPUT_SIZE][8]) } qsort(output[i], strlen(output[i]), 1, &char_cmp); r*=10; - if (strcmp(output[i], "abcefg") == 0) ; + if (strcmp(output[i], "abcefg") == 0) ; else if (strcmp(output[i], "cf") == 0) r += 1; else if (strcmp(output[i], "acdeg") == 0) r += 2; else if (strcmp(output[i], "acdfg") == 0) r += 3;