Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
14
Task/Tau-function/AutoHotkey/tau-function.ahk
Normal file
14
Task/Tau-function/AutoHotkey/tau-function.ahk
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
loop 100
|
||||
result .= SubStr(" " Tau(A_Index), -3) . (Mod(A_Index, 10) ? " " : "`n")
|
||||
MsgBox % result
|
||||
return
|
||||
|
||||
Tau(n){
|
||||
return StrSplit(Factors(n), ",").Count()
|
||||
}
|
||||
Factors(n) {
|
||||
Loop, % floor(sqrt(n))
|
||||
v := A_Index = 1 ? 1 "," n : mod(n,A_Index) ? v : v "," A_Index "," n//A_Index
|
||||
Sort, v, N U D,
|
||||
Return, v
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue