過去ログ

ゴンとも
abc
def
ghiと置いて

十進basicで羅列させました。

for a=1 to 9
for b=a+1 to 9
if b=a then goto 80
for c=b+1 to 9
if c=a or c=b then goto 70
for d=1 to 9
if d=a or d=b or d=c then goto 60
if d>a then goto 60
for e=d+1 to 9
if e=a or e=b or e=c or e=d then goto 50
if e>b then goto 50
for f=e+1 to 9
if f=a or f=b or f=c or f=d or f=e then goto 40
if f>c then goto 40
for g=1 to 9
if g=a or g=b or g=c or g=d or g=e or g=f then goto 30
if g>d then goto 30
for h=g+1 to 9
if h=a or h=b or h=c or h=d or h=e or h=f or h=g then goto 20
if h>e then goto 20
for i=h+1 to 9
if i=a or i=b or i=c or i=d or i=e or i=f or i=g or i=h then goto 10
if i>f then goto 10
print a;b;c;d;e;f;g;h;i
10 next i
20 next h
30 next g
40 next f
50 next e
60 next d
70 next c
80 next b
90 next a
end

f9押して以下の42通りを羅列!

369258147 379258146 379268145 389257146 389267145 469258137 469358127
479258136 479268135 479358126 479368125 489257136 489267135 489357126
489367125 569248137 569348127 579248136 579268134 579348126 579368124
579468123 589247136 589267134 589347126 589367124 589467123 679248135
679258134 679348125 679358124 679458123 689247135 689257134 689347125
689357124 689457123 789246135 789256134 789346125 789356124 789456123
豊川市   10月13日(木) 0:57:36     38458

過去問題一覧へ戻る