Data update
This commit is contained in:
parent
5af6d93694
commit
796d366b97
455 changed files with 7413 additions and 1900 deletions
17
Task/Amicable-pairs/EasyLang/amicable-pairs.easy
Normal file
17
Task/Amicable-pairs/EasyLang/amicable-pairs.easy
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
func sumdivs n .
|
||||
sum = 1
|
||||
for d = 2 to sqrt n
|
||||
if n mod d = 0
|
||||
sum += d + n div d
|
||||
.
|
||||
.
|
||||
return sum
|
||||
.
|
||||
for n = 1 to 20000
|
||||
m = sumdivs n
|
||||
if m > n
|
||||
if sumdivs m = n
|
||||
print n & " " & m
|
||||
.
|
||||
.
|
||||
.
|
||||
Loading…
Add table
Add a link
Reference in a new issue