Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Perfect-numbers/MAXScript/perfect-numbers.max
Normal file
12
Task/Perfect-numbers/MAXScript/perfect-numbers.max
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
fn isPerfect n =
|
||||
(
|
||||
local sum = 0
|
||||
for i in 1 to (n-1) do
|
||||
(
|
||||
if mod n i == 0 then
|
||||
(
|
||||
sum += i
|
||||
)
|
||||
)
|
||||
sum == n
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue