Data update
This commit is contained in:
parent
8e4e15fa56
commit
72eb4943cb
1853 changed files with 35514 additions and 9441 deletions
|
|
@ -0,0 +1,19 @@
|
|||
_limit = 100000
|
||||
|
||||
Long Q(_limit), i, count = 0
|
||||
|
||||
Q(1) = 1
|
||||
Q(2) = 1
|
||||
For i = 3 To _limit
|
||||
Q(i) = Q(i-Q(i-1)) + Q(i-Q(i-2))
|
||||
If Q(i) < Q(i-1) Then count += 1
|
||||
Next i
|
||||
|
||||
Print "First 10 elements:";
|
||||
For i = 1 To 10
|
||||
Print str$(Q(i)) + " ";
|
||||
Next i
|
||||
Print
|
||||
Print "Q(1000) is "; Q(1000)
|
||||
Print "There were" + str$(count) + " inversions"
|
||||
handleevents
|
||||
Loading…
Add table
Add a link
Reference in a new issue