Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
22
Task/Tau-number/MiniScript/tau-number.mini
Normal file
22
Task/Tau-number/MiniScript/tau-number.mini
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
isTauNumber = function(n)
|
||||
ans = 0
|
||||
i = 1
|
||||
while i * i <= n
|
||||
if n % i == 0 then
|
||||
ans += 1
|
||||
j = floor(n / i)
|
||||
if j != i then ans += 1
|
||||
end if
|
||||
i += 1
|
||||
end while
|
||||
return (n % ans) == 0
|
||||
end function
|
||||
|
||||
tauNums = []
|
||||
i = 1
|
||||
while tauNums.len < 100
|
||||
if isTauNumber(i) then tauNums.push(i)
|
||||
i += 1
|
||||
end while
|
||||
|
||||
print tauNums.join(", ")
|
||||
Loading…
Add table
Add a link
Reference in a new issue