24 lines
376 B
Plaintext
24 lines
376 B
Plaintext
include "std/io.zr"
|
|
|
|
func num_divisors[n: i64] : i64
|
|
end := n->isqrt()
|
|
|
|
out := 0
|
|
for i in 1..end+1
|
|
if n % i == 0
|
|
out += 2
|
|
|
|
if end * end == n
|
|
out -= 1
|
|
return out
|
|
|
|
func main[] : i64
|
|
n := 0
|
|
i := 1
|
|
while true
|
|
n += i
|
|
if num_divisors(n) > 500
|
|
io.println_i64(n)
|
|
break
|
|
i += 1
|