Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
53
Task/Yellowstone-sequence/Ring/yellowstone-sequence.ring
Normal file
53
Task/Yellowstone-sequence/Ring/yellowstone-sequence.ring
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
see "working..." + nl
|
||||
row = 3
|
||||
num = 2
|
||||
numbers = 1:51
|
||||
first = 2
|
||||
second = 3
|
||||
see "Yellowstone numbers are:" + nl
|
||||
see "1 " + first + " " + second + " "
|
||||
|
||||
for n = 4 to len(numbers)
|
||||
flag1 = 1
|
||||
flag2 = 1
|
||||
if first < numbers[n]
|
||||
min = first
|
||||
else
|
||||
min = numbers[n]
|
||||
ok
|
||||
for m = 2 to min
|
||||
if first%m = 0 and numbers[n]%m = 0
|
||||
flag1 = 0
|
||||
exit
|
||||
ok
|
||||
next
|
||||
if second < numbers[n]
|
||||
min = second
|
||||
else
|
||||
min = numbers[n]
|
||||
ok
|
||||
for m = 2 to min
|
||||
if second%m = 0 and numbers[n]%m = 0
|
||||
flag2 = 0
|
||||
exit
|
||||
ok
|
||||
next
|
||||
if flag1 = 0 and flag2 = 1
|
||||
see "" + numbers[n] + " "
|
||||
first = second
|
||||
second = numbers[n]
|
||||
del(numbers,n)
|
||||
row = row+1
|
||||
if row%10 = 0
|
||||
see nl
|
||||
ok
|
||||
num = num + 1
|
||||
if num = 29
|
||||
exit
|
||||
ok
|
||||
n = 3
|
||||
ok
|
||||
next
|
||||
|
||||
see "Found " + row + " Yellowstone numbers" + nl
|
||||
see "done..." + nl
|
||||
Loading…
Add table
Add a link
Reference in a new issue