Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,35 @@
|
|||
redim as uinteger mian(0 to 1)
|
||||
redim as uinteger sums(0 to 2)
|
||||
mian(0) = 1 : mian(1) = 2
|
||||
sums(0) = 2 : sums(1) = 3 : sums(2) = 4
|
||||
dim as uinteger n_mc = 2, n_sm = 3, curr = 3, tempsum
|
||||
while n_mc < 101
|
||||
for i as uinteger = 0 to n_mc - 1
|
||||
tempsum = curr + mian(i)
|
||||
for j as uinteger = 0 to n_sm - 1
|
||||
if tempsum = sums(j) then goto loopend
|
||||
next j
|
||||
next i
|
||||
redim preserve as uinteger mian(0 to n_mc)
|
||||
mian(n_mc) = curr
|
||||
redim preserve as uinteger sums(0 to n_sm + n_mc)
|
||||
for j as uinteger = 0 to n_mc - 1
|
||||
sums(n_sm + j) = mian(j) + mian(n_mc)
|
||||
next j
|
||||
n_mc += 1
|
||||
n_sm += n_mc
|
||||
sums(n_sm-1) = 2*curr
|
||||
loopend:
|
||||
curr += 1
|
||||
wend
|
||||
|
||||
print "Mian-Chowla numbers 1 through 30: ",
|
||||
for i as uinteger = 0 to 29
|
||||
print mian(i),
|
||||
next i
|
||||
print
|
||||
print "Mian-Chowla numbers 91 through 100: ",
|
||||
for i as uinteger = 90 to 99
|
||||
print mian(i),
|
||||
next i
|
||||
print
|
||||
Loading…
Add table
Add a link
Reference in a new issue