I’ve been pulling my hair on the PRIME1 problem for some time. I seemingly take the correct input and output the correct answers when I do my own testing.
Would really appreciate a second pair of eyes here.
Ps. I know global variables are bad and that I can quickly generate the hardcoded primes using sieve of Eratosthenes.