過去ログ

ミキティ
工夫のない解き方ですが……
100 s=0
110 for a11=0 to 1
120 for a12=0 to 1
130 for a13=0 to 1
140 for a14=0 to 1
145 if a11+a12+a13+a14<>2 then goto 530
150 for a21=0 to 1
160 for a22=0 to 1
170 for a23=0 to 1
180 for a24=0 to 1
185 if a21+a22+a23+a24<>2 then goto 490
190 for a31=0 to 1
200 for a32=0 to 1
210 for a33=0 to 1
220 for a34=0 to 1
225 if a31+a32+a33+a34<>2 then goto 450
230 for a41=0 to 1
235 if a11+a21+a31+a41<>2 then goto 440
240 for a42=0 to 1
245 if a12+a22+a32+a42<>2 then goto 430
250 for a43=0 to 1
255 if a13+a23+a33+a43<>2 then goto 420
260 for a44=0 to 1
265 if a14+a24+a34+a44<>2 then goto 410
310 s=s+1
410 next a44
420 next a43
430 next a42
440 next a41
450 next a34
460 next a33
470 next a32
480 next a31
490 next a24
500 next a23
510 next a22
520 next a21
530 next a14
540 next a13
550 next a12
560 next a11
610 print s
990 end
   4月20日(木) 0:09:53     27230

過去問題一覧へ戻る