21 lines
400 B
Plaintext
21 lines
400 B
Plaintext
func num_divisors[n: I64] : I64
|
|
let end: I64 = Math.isqrt(n)
|
|
|
|
let out: I64 = 0
|
|
for i in 1..end+1
|
|
if n % i == 0
|
|
out = out + 2
|
|
|
|
if end * end == n
|
|
out = out - 1
|
|
return out
|
|
|
|
func main[] : I64
|
|
let n: I64 = 0
|
|
let i: I64 = 1
|
|
while true
|
|
n = n + i
|
|
if num_divisors(n) > 500
|
|
print_i64(n)
|
|
break
|
|
i = i + 1 |