This commit is contained in:
2025-06-01 21:48:47 +02:00
parent 437697b287
commit e647e7f508
20 changed files with 167 additions and 147 deletions

View File

@@ -1,27 +1,9 @@
func print_i64[x: I64] : I64
printf("%ld\n", x)
func is_prime[n: I64]: I64
if n <= 1
return false
if n == 2 || n == 3
return true
if n % 2 == 0 || n % 3 == 0
return false
let i: I64 = 5
while i * i <= n
if n % i == 0 || n % (i + 2) == 0
return false
i = i + 6
return true
func main[] : I64
let found: I64 = 0
let i: I64 = 1
while 1
if is_prime(i)
if Math.is_prime(i)
found = found + 1
if found == 10001
print_i64(i)