過去ログ

ゴンとも
十進basic で配る順番のカードをa,b,c,d,e,f,g,hとして

for a=1 to 4
for b=1 to 4
for c=1 to 4
for d=1 to 4
for e=1 to 4
if a=e then goto 40
for f=1 to 4
if b=f then goto 30
for g=1 to 4
if c=g then goto 20
for h=1 to 4
if d=h then goto 10
if a+b+c+d+e+f+g+h=20 and a*b*c*d*e*f*g*h=576 then let s=s+1
10 next h
20 next g
30 next f
40 next e
50 next d
60 next c
70 next b
80 next a
print s
end

f9押して 1440通り・・・・・・(答え)
豊川市   12月11日(木) 0:15:51     42697

過去問題一覧へ戻る