過去ログ

ゴンとも
十進basicで6回をa,b,c,d,e,fで
個数でア=1,イイ=2,ウウウ=3として

FOR a=1 TO 3
for b=1 to 3
for c=1 to 3
if a+b=5 and c=1 then let s1=s1+1
for d=1 to 3
if a+b+c=5 and d=1 then let s2=s2+1
for e=1 to 3
if a+b+c+d=5 and e=1 then let s3=s3+1
for f=1 to 3
if a+b+c+d+e=5 and f=1 then let s4=s4+1
10 next f
20 next e
30 next d
40 next c
50 next b
60 next a
print 3^3*s1+3^2*s2+3*s3+s4
END

f9押して 121・・・・・・(答え)
豊川市   3月5日(木) 0:55:47   MAIL:fttnm528@ybb.ne.jp   42994

過去問題一覧へ戻る