RosettaCodeData/Task/Circular-primes/Phix/circular-primes-2.phix
2026-02-01 16:33:20 -08:00

7 lines
288 B
Text

printf(1,"The following repunits are probably circular primes:\n")
for n in {5003, 9887, 15073, 25031, 35317, 49081} do
atom start = time()
mpz_set_str(z,repeat('1',n))
bool bPrime = mpz_prime(z,1)
printf(1,"R(%d) : %t (%s)\n", {n, bPrime, elapsed(time()-start)})
end for