Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,25 @@
|
|||
OpenConsole()
|
||||
|
||||
limite.l = 2e6
|
||||
Dim DSum.l(limite+1)
|
||||
Dim DCount.l(limite+1)
|
||||
|
||||
For i.l = 0 To limite
|
||||
DSum(i) = 1
|
||||
DCount(i) = 1
|
||||
Next i
|
||||
|
||||
For i = 2 To limite
|
||||
j.l = i + i
|
||||
While j <= limite
|
||||
If DSum(j) = j
|
||||
PrintN(RSet(Str(j), 8) + " equals the sum of its first " + RSet(Str(DCount(j)), 3) + " divisors")
|
||||
EndIf
|
||||
DSum(j) = DSum(j) + i
|
||||
DCount(j) = DCount(j) + 1
|
||||
j = j + i
|
||||
Wend
|
||||
Next i
|
||||
|
||||
PrintN(#CRLF$ + "--- terminado, pulsa RETURN---"): Input()
|
||||
CloseConsole()
|
||||
Loading…
Add table
Add a link
Reference in a new issue