|
ゴンとも |
|
十進basic で表,裏をそれぞれ0,1とし
8回を順にa,b,c,d,e,f,g,hとすると for a=0 to 1 for b=0 to 1 for c=0 to 1 if (a=0 and b=0 and c=0) or (a=1 and b=1 and c=1) then goto 60 for d=0 to 1 IF (b=0 AND c=0 AND d=0) OR (b=1 AND c=1 AND d=1) THEN GOTO 50 for e=0 to 1 IF (c=0 AND d=0 AND e=0) OR (c=1 AND d=1 AND e=1) THEN GOTO 40 for f=0 to 1 IF (d=0 AND e=0 AND f=0) OR (d=1 AND e=1 AND f=1) THEN GOTO 30 for g=0 to 1 IF (e=0 AND f=0 AND g=0) OR (e=1 AND f=1 AND g=1) THEN GOTO 20 for h=0 to 1 IF (f=0 AND g=0 AND h=0) OR (f=1 AND g=1 AND h=1) 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押して 16・・・・・・(答え) |
|
豊川市
9月11日(木) 0:25:16
MAIL:fttnm528@ybb.ne.jp 42348 |