RosettaCodeData/Task/Tau-function/EasyLang/tau-function.easy

18 lines
256 B
Text
Raw Permalink Normal View History

2026-04-30 12:34:36 -04:00
func divcnt n .
tot = 1
p = 2
while p <= sqrt n
cnt = 1
while n mod p = 0
2023-12-16 21:33:55 -08:00
cnt += 1
2026-04-30 12:34:36 -04:00
n /= p
2023-12-16 21:33:55 -08:00
.
2026-04-30 12:34:36 -04:00
tot *= cnt
p += 1
2023-12-16 21:33:55 -08:00
.
2026-04-30 12:34:36 -04:00
if n > 1 : tot *= 2
return tot
2023-12-16 21:33:55 -08:00
.
2026-04-30 12:34:36 -04:00
for i to 100 : write divcnt i & " "
print ""