Data update
This commit is contained in:
parent
29a5eea0d4
commit
5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions
27
Task/Ludic-numbers/EasyLang/ludic-numbers.easy
Normal file
27
Task/Ludic-numbers/EasyLang/ludic-numbers.easy
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
proc initLudicArray n . res[] .
|
||||
len res[] n
|
||||
res[1] = 1
|
||||
for i = 2 to n
|
||||
k = 0
|
||||
for j = i - 1 downto 2
|
||||
k = k * res[j] div (res[j] - 1) + 1
|
||||
.
|
||||
res[i] = k + 2
|
||||
.
|
||||
.
|
||||
initLudicArray 2005 arr[]
|
||||
for i = 1 to 25
|
||||
write arr[i] & " "
|
||||
.
|
||||
print ""
|
||||
print ""
|
||||
i = 1
|
||||
while arr[i] <= 1000
|
||||
cnt += 1
|
||||
i += 1
|
||||
.
|
||||
print cnt
|
||||
print ""
|
||||
for i = 2000 to 2005
|
||||
write arr[i] & " "
|
||||
.
|
||||
Loading…
Add table
Add a link
Reference in a new issue