�������裹�������ʬ�β�����

吉川マサル
すみません、6段の場合を正答ファイルと掲示板のパスワードにしてしまっていました...m(__)m
iMac   11月5日(木) 0:52:32   HomePage:ARENA  43860
baLLjugglermoka
今週の問題は漸化式(An)=2(An-1)-4(An-2)で
A1=1、A2=4ですね。
問題文に各マスは1回だけ通ると補足しないと無限通りになりますね。

てか、漸化式って思いっきり高校数学の気がしますが、算数解法ってどうやるんだろう...
   11月5日(木) 0:56:35     43861
ベルク・カッツェ
正解者一覧出ましたね、マサルさん修正お疲れ様です。

横に移動する場合の2マス1段、上に行って下に戻ってまた上がる場合の4マス2段、この2種類の組み合わせで考えました。
2段と1段で合計7段にする組み合わせが1+6+10+4=21通り、
そして最初の段以外は左右の入れ替えが可能なので、答えは21×64=1344通り。
   11月5日(木) 0:58:43     43862
長野 美光
#43861
(An)=2(An-1)+4(An-2)
ですね。

クロスするパターンを忘れてて
(An)=2(An-1)+2(An-2)
としたり、初期値を A2=3 としたりしてました。
はままつし   11月5日(木) 1:05:01   HomePage:ヨッシーの算数・数学の部屋  43863
今年から高齢者
漸化式風に解いて、1つ前の2倍と2つ前の4倍の合計。
1344は早めに出たのですが、自信が無いので、認証で確認と思っていたのが裏目。
n=1の扱いに困って、n=2とn=3を書きだしてみた。
   11月5日(木) 1:07:53     43864
Jママ
こんばんは
ちょっと迷走しました(^^;
http://www.fastpic.jp/images.php?file=6229002921.jpg
見えるでしょうか
ずぼらで画像頼みですみません
   11月5日(木) 1:08:33     43865
Mr.ダンディ
n段目が完成した時点で 上または斜め上に行ったあと(2通り)
�[戮帽圓韻�(n+1)段を完成させ、(n+2)段目を完成するのに2通り
�⊂紊泙燭麓个畩紊某覆鵑生紂�(n+1)段目まで完成すりまで 1通り
よって
A[n+2]=2*{A[n]*2+A[n+1]}
A[n+2]=4・A[n]+2・A[n+1]
A[2]=4 ,A[3]=12

(一般項を求めるのならともかく、規則性から順に表をつくっていけばよい
ので、算数の範囲とみてもよいと私は思います)
   11月5日(木) 12:50:47     43866
CRYING DOLPHIN
ナナメに進むパターンを忘れてました…orz
それさえ逃さなければ、漸化式で素早く解決するから、難関中学入試レベルかな?
(あと「2つのGのどちらかに、14マスすべてを通って到達」の部分は、全部通ればいいのか?Gだけは1つだけ通れば
いいのか?と、いつもの貧弱な国語力により迷ったりもしてしまった)

以下、★が現在位置、■が過去に通ったマス、□がまだ通ってないマスとします。
まとめ以降は、Pフォントの方が見やすいと思います。

・S(1)
第一手は下に進むしかなく、1通り。
★
□

・S(2)
第一手は下に進むとき、2通り。
★□ → ■□ … ■★ ■□
□□ → ★□ … ■□ ■★
第一手は右に進むとき、1通り。
★□ → ■★ → ■■
□□ → □□ → ■★
第一手は斜めに進むとき、1通り。
★□ → ■□ → ■★
□□ → □★ → ■■
合計、2+1+1=4通り。

・S(3)
第一手は下に進むとき、S(2)の形が2つ残るので、S(2)×2=4×2=8通り。
★□□ → ■□□ … ■★□ ■□□
□□□ → ★□□ … ■□□ ■★□
第一手は右に進むとき、S(1)の形が2つ残るので、S(1)×2=1×2=2通り。
★□□ → ■★□ → ■■□ … ■■★ ■■□
□□□ → □□□ → ■★□ … ■■□ ■■★
第一手は斜めに進むとき、S(1)の形が2つ残るので、S(1)×2=1×2=2通り。
★□□ → ■□□ → ■★□ … ■■★ ■■□
□□□ → □★□ → ■■□ … ■■□ ■■★
合計、8+2+2=12通り。

・S(4)
第一手は下に進むとき、S(3)の形が2つ残るので、S(3)×2=12×2=24通り。
★□□□ → ■□□□ … ■★□□ ■□□□
□□□□ → ★□□□ … ■□□□ ■★□□
第一手は右に進むとき、S(2)の形が2つ残るので、S(2)×2=4×2=8通り。
★□□□ → ■★□□ → ■■□□ … ■■★□ ■■□□
□□□□ → □□□□ → ■★□□ … ■■□□ ■■★□
第一手は斜めに進むとき、S(2)の形が2つ残るので、S(2)×2=4×2=8通り。
★□□□ → ■□□□ → ■★□□ … ■■★□ ■■□□
□□□□ → □★□□ → ■■□□ … ■■□□ ■■★□
合計、24+8+8=40通り。

・まとめ…S(N)
第一手は下に進むとき、S(N-1)の形が2つ残る。
第一手は右に進むとき、S(N-2)の形が2つ残る。
第一手は斜めに進むとき、S(N-2)の形が2つ残る。

S S(1) S(2) S(3) S(4) S(5) S(6) S(7)
│ **1 **2 **8 *24 *80 256 832
─ **0 **1 **2 **8 *24 *80 256
\ **0 **1 **2 **8 *24 *80 256
計 **1 **4 *12 *40 128 416 1344

誰もいない市街地   11月5日(木) 2:19:31   HomePage:ブログもある。  43867
ゴンとも
十進Basic で 問題図に番号を振る

(13)(14)
(11)(12)
(09)(10)
(07)(08)
(05)(06)
(03)(04)
(01)(02)

FOR a=1 to 1
FOR b=2 to 4
if b=a then goto 130
FOR c=2 to 6
if c=a or c=b then goto 120
if b=2 and (c<>3 and c<>4) then goto 120
if b=3 and (c<>2 and c<>4 and c<>5 and c<>6) then goto 120
if b=4 and (c<>2 and c<>3 and c<>5 and c<>6) then goto 120
FOR d=2 to 8
if d=a or d=b or d=c then goto 110
if c=2 and (d<>3 and d<>4) then goto 110
if c=3 and (d<>2 and d<>4 and d<>5 and d<>6) then goto 110
if c=4 and (d<>2 and d<>3 and d<>5 and d<>6) then goto 110
if c=5 and (d<>3 and d<>4 and d<>6 and d<>7 and d<>8) then goto 110
if c=6 and (d<>3 and d<>4 and d<>5 and d<>7 and d<>8) then goto 110
FOR e=2 to 10
if e=a or e=b or e=c or e=d then goto 100
if d=2 and (e<>3 and e<>4) then goto 100
if d=3 and (e<>2 and e<>4 and e<>5 and e<>6) then goto 100
if d=4 and (e<>2 and e<>3 and e<>5 and e<>6) then goto 100
if d=5 and (e<>3 and e<>4 and e<>6 and e<>7 and e<>8) then goto 100
if d=6 and (e<>3 and e<>4 and e<>5 and e<>7 and e<>8) then goto 100
if d=7 and (e<>5 and e<>6 and e<>8 and e<>9 and e<>10) then goto 100
if d=8 and (e<>5 and e<>6 and e<>7 and e<>9 and e<>10) then goto 100
FOR f=2 to 12
if f=a or f=b or f=c or f=d or f=e then goto 90
if e=2 and (f<>3 and f<>4) then goto 90
if e=3 and (f<>2 and f<>4 and f<>5 and f<>6) then goto 90
if e=4 and (f<>2 and f<>3 and f<>5 and f<>6) then goto 90
if e=5 and (f<>3 and f<>4 and f<>6 and f<>7 and f<>8) then goto 90
if e=6 and (f<>3 and f<>4 and f<>5 and f<>7 and f<>8) then goto 90
if e=7 and (f<>5 and f<>6 and f<>8 and f<>9 and f<>10) then goto 90
if e=8 and (f<>5 and f<>6 and f<>7 and f<>9 and f<>10) then goto 90
if e=9 and (f<>7 and f<>8 and f<>10 and f<>11 and f<>12) then goto 90
if e=10 and (f<>7 and f<>8 and f<>9 and f<>11 and f<>12) then goto 90
FOR g=2 to 14
if g=a or g=b or g=c or g=d or g=e or g=f then goto 80
if f=2 and (g<>3 and g<>4) then goto 80
if f=3 and (g<>2 and g<>4 and g<>5 and g<>6) then goto 80
if f=4 and (g<>2 and g<>3 and g<>5 and g<>6) then goto 80
if f=5 and (g<>3 and g<>4 and g<>6 and g<>7 and g<>8) then goto 80
if f=6 and (g<>3 and g<>4 and g<>5 and g<>7 and g<>8) then goto 80
if f=7 and (g<>5 and g<>6 and g<>8 and g<>9 and g<>10) then goto 80
if f=8 and (g<>5 and g<>6 and g<>7 and g<>9 and g<>10) then goto 80
if f=9 and (g<>7 and g<>8 and g<>10 and g<>11 and g<>12) then goto 80
if f=10 and (g<>7 and g<>8 and g<>9 and g<>11 and g<>12) then goto 80
if f=11 and (g<>9 and g<>10 and g<>12 and g<>13 and g<>14) then goto 80
if f=12 and (g<>9 and g<>10 and g<>11 and g<>13 and g<>14) then goto 80
if f=13 and (g<>11 and g<>12) then goto 80
if f=14 and (g<>11 and g<>12) then goto 80
FOR h=2 to 14
if h=a or h=b or h=c or h=d or h=e or h=f or h=g then goto 70
if g=2 and (h<>3 and h<>4) then goto 70
if g=3 and (h<>2 and h<>4 and h<>5 and h<>6) then goto 70
if g=4 and (h<>2 and h<>3 and h<>5 and h<>6) then goto 70
if g=5 and (h<>3 and h<>4 and h<>6 and h<>7 and h<>8) then goto 70
if g=6 and (h<>3 and h<>4 and h<>5 and h<>7 and h<>8) then goto 70
if g=7 and (h<>5 and h<>6 and h<>8 and h<>9 and h<>10) then goto 70
if g=8 and (h<>5 and h<>6 and h<>7 and h<>9 and h<>10) then goto 70
if g=9 and (h<>7 and h<>8 and h<>10 and h<>11 and h<>12) then goto 70
if g=10 and (h<>7 and h<>8 and h<>9 and h<>11 and h<>12) then goto 70
if g=11 and (h<>9 and h<>10 and h<>12 and h<>13 and h<>14) then goto 70
if g=12 and (h<>9 and h<>10 and h<>11 and h<>13 and h<>14) then goto 70
if g=13 and (h<>11 and h<>12) then goto 70
if g=14 and (h<>11 and h<>12) then goto 70
FOR i=2 to 14
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 60
if g+i=27 then goto 60
if h=2 and (i<>3 and i<>4) then goto 60
if h=3 and (i<>2 and i<>4 and i<>5 and i<>6) then goto 60
if h=4 and (i<>2 and i<>3 and i<>5 and i<>6) then goto 60
if h=5 and (i<>3 and i<>4 and i<>6 and i<>7 and i<>8) then goto 60
if h=6 and (i<>3 and i<>4 and i<>5 and i<>7 and i<>8) then goto 60
if h=7 and (i<>5 and i<>6 and i<>8 and i<>9 and i<>10) then goto 60
if h=8 and (i<>5 and i<>6 and i<>7 and i<>9 and i<>10) then goto 60
if h=9 and (i<>7 and i<>8 and i<>10 and i<>11 and i<>12) then goto 60
if h=10 and (i<>7 and i<>8 and i<>9 and i<>11 and i<>12) then goto 60
if h=11 and (i<>9 and i<>10 and i<>12 and i<>13 and i<>14) then goto 60
if h=12 and (i<>9 and i<>10 and i<>11 and i<>13 and i<>14) then goto 60
if h=13 and (i<>11 and i<>12) then goto 60
if h=14 and (i<>11 and i<>12) then goto 60
FOR j=2 to 14
if j=a or j=b or j=c or j=d or j=e or j=f or j=g or j=h or j=i then goto 50
if g+j=27 or h+j=27 then goto 50
if i=2 and (j<>3 and j<>4) then goto 50
if i=3 and (j<>2 and j<>4 and j<>5 and j<>6) then goto 50
if i=4 and (j<>2 and j<>3 and j<>5 and j<>6) then goto 50
if i=5 and (j<>3 and j<>4 and j<>6 and j<>7 and j<>8) then goto 50
if i=6 and (j<>3 and j<>4 and j<>5 and j<>7 and j<>8) then goto 50
if i=7 and (j<>5 and j<>6 and j<>8 and j<>9 and j<>10) then goto 50
if i=8 and (j<>5 and j<>6 and j<>7 and j<>9 and j<>10) then goto 50
if i=9 and (j<>7 and j<>8 and j<>10 and j<>11 and j<>12) then goto 50
if i=10 and (j<>7 and j<>8 and j<>9 and j<>11 and j<>12) then goto 50
if i=11 and (j<>9 and j<>10 and j<>12 and j<>13 and j<>14) then goto 50
if i=12 and (j<>9 and j<>10 and j<>11 and j<>13 and j<>14) then goto 50
if i=13 and (j<>11 and j<>12) then goto 50
if i=14 and (j<>11 and j<>12) then goto 50
FOR k=2 to 14
if k=a or k=b or k=c or k=d or k=e or k=f or k=g or k=h or k=i or k=j then goto 40
if i+k=27 or h+k=27 or g+k=27 then goto 40
if j=2 and (k<>3 and k<>4) then goto 40
if j=3 and (k<>2 and k<>4 and k<>5 and k<>6) then goto 40
if j=4 and (k<>2 and k<>3 and k<>5 and k<>6) then goto 40
if j=5 and (k<>3 and k<>4 and k<>6 and k<>7 and k<>8) then goto 40
if j=6 and (k<>3 and k<>4 and k<>5 and k<>7 and k<>8) then goto 40
if j=7 and (k<>5 and k<>6 and k<>8 and k<>9 and k<>10) then goto 40
if j=8 and (k<>5 and k<>6 and k<>7 and k<>9 and k<>10) then goto 40
if j=9 and (k<>7 and k<>8 and k<>10 and k<>11 and k<>12) then goto 40
if j=10 and (k<>7 and k<>8 and k<>9 and k<>11 and k<>12) then goto 40
if j=11 and (k<>9 and k<>10 and k<>12 and k<>13 and k<>14) then goto 40
if j=12 and (k<>9 and k<>10 and k<>11 and k<>13 and k<>14) then goto 40
if j=13 and (k<>11 and k<>12) then goto 40
if j=14 and (k<>11 and k<>12) then goto 40
FOR l=2 to 14
if l=a or l=b or l=c or l=d or l=e or l=f or l=g or l=h or l=i or l=j or l=k then goto 30
if i+l=27 or h+l=27 or g+l=27 then goto 30
if k=2 and (l<>3 and l<>4) then goto 30
if k=3 and (l<>2 and l<>4 and l<>5 and l<>6) then goto 30
if k=4 and (l<>2 and l<>3 and l<>5 and l<>6) then goto 30
if k=5 and (l<>3 and l<>4 and l<>6 and l<>7 and l<>8) then goto 30
if k=6 and (l<>3 and l<>4 and l<>5 and l<>7 and l<>8) then goto 30
if k=7 and (l<>5 and l<>6 and l<>8 and l<>9 and l<>10) then goto 30
if k=8 and (l<>5 and l<>6 and l<>7 and l<>9 and l<>10) then goto 30
if k=9 and (l<>7 and l<>8 and l<>10 and l<>11 and l<>12) then goto 30
if k=10 and (l<>7 and l<>8 and l<>9 and l<>11 and l<>12) then goto 30
if k=11 and (l<>9 and l<>10 and l<>12 and l<>13 and l<>14) then goto 30
if k=12 and (l<>9 and l<>10 and l<>11 and l<>13 and l<>14) then goto 30
if k=13 and (l<>11 and l<>12) then goto 30
if k=14 and (l<>11 and l<>12) then goto 30
FOR m=2 to 14
if m=a or m=b or m=c or m=d or m=e or m=f or m=g or m=h or m=i or m=j or m=k or m=l then goto 20
if j+m=27 or i+m=27 or h+m=27 or g+m=27 then goto 20
if l=2 and (m<>3 and m<>4) then goto 20
if l=3 and (m<>2 and m<>4 and m<>5 and m<>6) then goto 20
if l=4 and (m<>2 and m<>3 and m<>5 and m<>6) then goto 20
if l=5 and (m<>3 and m<>4 and m<>6 and m<>7 and m<>8) then goto 20
if l=6 and (m<>3 and m<>4 and m<>5 and m<>7 and m<>8) then goto 20
if l=7 and (m<>5 and m<>6 and m<>8 and m<>9 and m<>10) then goto 20
if l=8 and (m<>5 and m<>6 and m<>7 and m<>9 and m<>10) then goto 20
if l=9 and (m<>7 and m<>8 and m<>10 and m<>11 and m<>12) then goto 20
if l=10 and (m<>7 and m<>8 and m<>9 and m<>11 and m<>12) then goto 20
if l=11 and (m<>9 and m<>10 and m<>12 and m<>13 and m<>14) then goto 20
if l=12 and (m<>9 and m<>10 and m<>11 and m<>13 and m<>14) then goto 20
if l=13 and (m<>11 and m<>12) then goto 20
if l=14 and (m<>11 and m<>12) then goto 20
FOR n=13 to 14
if n=a or n=b or n=c or n=d or n=e or n=f or n=g or n=h or n=i or n=j or n=k or n=l or n=m then goto 10
if n=13 and (m<>11 and m<>12 and m<>14) then goto 10
if n=14 and (m<>11 and m<>12 and m<>13) then goto 10
let s=s+1
10 next n
20 next m
30 next l
40 next k
50 next j
60 next i
70 next h
80 next g
90 next f
100 next e
110 next d
120 next c
130 next b
140 next a
print s
end

f9押して 1344・・・・・・(答え)
豊川市   11月5日(木) 3:01:54   MAIL:fttnm528@ybb.ne.jp   43868
あみー
こう…
−−
1214
1311
−−
0910
−−
0608
0507
−−
0304
−−
0102

みたいな感じで,要はこれまで通ったマス目を塗った時に長方形または正方形になる瞬間に注目しました。
1列だけ増えるときは左右どちらを先に通るかで2通り。
2列一気に増えるときは2列分の左右どちらを先に通るかで4通り。
つまり1列前の2倍,2列前の4倍と考え,あとは表でした。

終電逃しましたが,合っててよかったです…。
   11月5日(木) 3:15:04     43869
algebra
a(1)=4,a(2)=12,a(n+2)=2a(n+1)+4a(n) より,a(6)=1344
   11月5日(木) 11:31:32     43870
uchinyan
はい,こんにちは。さて,今回の問題は...
この問題,問題文が若干あいまいかも知れません。「14マスすべてを通って」はいいのですが,1度通ったマス目はもう1度は通らない,ですよね。
そうしないと同じマス目を通って無限ループにもなり得るので。まぁ,明らかではあるのですが,明記した方がいいかも。
それもあってか正解率は低いですね。もっともそれ抜きでも,算チャレでも標準的か最近の傾向ではやや難,世の中的には難しい方でしょうか。
私は数学的になってしまいますが漸化式で解きました。図を使い例示すれば小学生にも説明はできるだろうと思います。
というわけで,こんな感じ。

まず,1度通ったマス目はもう1度は通らない,という隠れた条件があります。
そうしないと同じマス目を通って無限ループにもなり得て意味がない場合が可能になってしまうからです。
そこで,以下ではこの条件を大前提として考えます。
横 2 マス,縦 n マスの場合の数を a(n) 通りとします。S からは,右,上,右上,に行けます。
(1) S から右に行く場合
次に行けるのは,左上,上,のいずれかです。
左上に行くときは,縦が n-1 マスになるので a(n-1) 通り,
上に行くときは,縦が n-1 マスで出発位置が左ではなく右になりますが,左右二つの G のどちらをゴールにしてもいいので,
出発位置が左の場合と対称で場合の数は同じ a(n-1) 通りになります。
そこで,結局,この場合は,a(n-1) * 2 通り,です。
(2) S から上に行く場合
次に行けるのは,上,右上,右,右下,のいずれかです。
上,右上,右,に行くときは,1度通ったマスをもう1度通らずに 右下 = S の右 に行き再び上には行けないので,不可。
右下に行くときは,その上 = S の右上 に行くしかなく,これはこの後 (1) の縦 n-1 マスの場合と同じになるので a(n-2) * 2 通りです。
そこで,結局,この場合は,a(n-2) * 2 通り,です。
(3) S から右上に行く場合
次に行けるのは,左上,上,左,下,のいずれかです。
左上,上,左,に行くときは,1度通ったマスをもう1度通らずに 下 = S の右 に行き再び上には行けないので,不可。
下に行くときは,その左上 = S の上 に行くしかなく,これはこの後 (1) の縦 n-1 マスの場合の対称パターンと同じになるので a(n-2) * 2 通りです。
そこで,結局,この場合は,a(n-2) * 2 通り,です。
以上ですべてなので,結局,a(n) = a(n-1) * 2 + a(n-2) * 4,です。
これより,実際に調べて,a(1) = 1,a(2) = a(1) * 2 + 1 + 1 = 4,より,求めるのは a(7) なので,
a(3) = a(2) * 2 + a(1) * 4 = 4 * 2 + 1 * 4 = 8 + 4 = 12,
a(4) = a(3) * 2 + a(2) * 4 = 12 * 2 + 4 * 4 = 24 + 16 = 40,
a(5) = a(4) * 2 + a(3) * 4 = 40 * 2 + 12 * 4 = 80 + 48 = 128,
a(6) = a(5) * 2 + a(4) * 4 = 128 * 2 + 40 * 4 = 256 + 160 = 416,
a(7) = a(6) * 2 + a(5) * 4 = 416 * 2 + 128 * 4 = 832 + 512 = 1344,
そこで,求める場合の数は,1344 通り,になります。

実は,漸化式はあっさりと求まったものの,つまらない計算ミスでしばし首を傾げていたのは,内緒 (^^;
ネコの住む家   11月5日(木) 18:01:38     43871
abcde
縦nマスの場合は
2^(n-1)×{(n+1)番目のフィボナッチ数}で求まりそうです
   11月5日(木) 14:04:53     43872
uchinyan
掲示板を読みました。若干のトラブルがあったようですね。

注意
以下の記述は,そもそもは私自身の勉強のメモに過ぎないのですが,
折角なのでご参考までにと思って公開するものです。
そういうこともあって,解法の分類は算チャレの F.A.Q. の「算数の範囲」の記述を参考に,
私個人が独断と偏見で主観的に行っているものであって,客観的なものではありません。
あくまでもご参考です。悪しからず。

#43861,#43863,#43864,#43866,#43867,?#43869,#43870,#43871,#43874,#43876
漸化式による解法。
漸化式自体,特にその一般式,は高校数学の範囲ですが,その考え方は算数の範囲,と私は理解しています。
ただ,それを算数としてどう説明するかには,図による例示,一般式にならない具体化,表による計算,など,
かなりの工夫が必要でしょうね。

#43862,#43865,#43875
最初に右に行く横2縦1と最初に上又は右上に行く横2縦2,さらに2つのゴールの左右の対称性,から考える解法。
なるほど。これは見事な算数解法ですね。確かに漸化式の考え方からも分かりますが,こういう考え方は気付かなかったな。
勉強になりました。

#43868
プログラムによる解法。

なお,
#43872
>縦nマスの場合は
>2^(n-1)×{(n+1)番目のフィボナッチ数}で求まりそうです
はい,そうですね。
漸化式からも明らかですが,特に,#43862などから,階段上り,畳敷き,などの 2 のべき乗倍になることからも分かります。
ネコの住む家   11月6日(金) 14:34:48     43873
abcde
同じ高さのマスは左から先に通るという条件をつけて数えてみると
左下からスタートする場合、
右→左上(スタート地点の1段上)
上→右下→上→左上(スタート地点の2段上)
の2種類の進み方しかできなくなり
その進み方がフィボナッチ数になる事がわかります

実際にはスタート地点以外の(n-1)段は左右どちらを先に通ってもよいので
2^(n-1)倍の進み方ができるということですね
   11月5日(木) 14:24:08     43874
あめい
漸化式でいけそうと思いながら作れず、場合分けで求めました。
移動の仕方は横への2マス1段(2通り)と上下上の4マス2段の2種類(4通り)あり、下の段だけはスタートが片側なので、
最初に横にいく(1段の場合)と最初に上に行く(2段の場合)に分け、それ以降の(1段の数,2段の数)と表すと
最初に横(1段)の場合
・(6,0)・・・・・・1パターンなので・・・・2^6=64通り
・(4,1)・・・・・・5パターンなので・・・・2^4*4*5=320通り
・(2,2)・・・・・・6パターンなので・・・・2^2*4*4*6=384通り
・(0,3)・・・・・・1パターンなので・・・・4*4*4=64通り    合計832通り
最初に上(上下上の2段)の場合
・(5,0)・・・・・・1パターンなので・・・・2^5=32通り
・(3,1)・・・・・・4パターンなので・・・・2^3*4*4=128通り
・(1,2)・・・・・・3パターンなので・・・・2*4*4*3=96通り     合計256通りだが下2段が(上、斜め下、上)と(斜め上、下、斜め上)の2通りあるので256*2=512通り
で832+512=1344通りとなりました。
漸化式や他の求め方を皆さんのを見せていただき勉強します。
(いくつになってもわからないって楽しい、と思います)
   11月5日(木) 17:27:28     43875
みかん

スタートの位置をとりあえず考えないことにすると、1段の場合は右が先か左が先かの
2通り。
2段をいっきに片付ける場合は
・左下→左上→右下→右上
・左下→右上→右下→左上
・右下→右上→左下→左上
・右下→左上→左下→右上
の4通り。

2段=正方形4つの場合、
(1)1段めを片付けてから2段めに進む
→1段めが2通り、2段めも2通り。場合の数は2×2=4通り。
(2)2段をまとめて片付ける
→4通り。
従って、全体では4+4=8通り。

3段=正方形6つの場合、
(1)2段めまで済んだ状態でいちばん上の1段に進む
→8×2=16通り
(2)1段めまで済んだ状態で上の2段をまとめて片付ける
→2×4=8通り
従って、全体では16+8=24通り。

これ以降のn段の場合=(n−1)段の場合×2+(n−2)段の場合×4
となるので、
4段 24×2+8×4=80通り
5段 80×2+24×4=256通り
6段 256×2+80×4=832通り
7段 832×2+256×4=2688通り

ここで、スタートの位置は左下と決められているので、
2688÷2=1344通り、が答え。
   11月5日(木) 22:20:11     43876
みかん
中学入試でよくある漸化式っぽく解く問題としては
「コインの表が出たら階段を1段、裏が出たら階段を2段上る。5段めまで
上る時、コインの裏表の出方は何通りあるか?」
といったのがおなじみでしょうか。
書き出しても解けるけれど、漸化式っぽく解くのを知っていれば効率がいい
ぐらいの段数が問題になっていると思います。算チャレでは漸化式的な解法を
知らないと大変なのが出ることが多いかな。
   11月5日(木) 22:27:12     43877
沢井 ねむ・る
1回目に448と打ち込んで入れてもらえず。
何度か下がることができることに気づいて解き直してやっと入れました。
   11月7日(土) 18:21:22     43878
てい
1段,2段,3段・・・と増やしていくと自然に漸化式にたどり着きました。
   11月7日(土) 20:31:41     43879
つむぎ
まあ,今回のはフィボナッチです左ε=ε=(ノ≧∇≦)ε=ε=(ノ≧∇≦)ノε=ε=(ノ≧∇≦)ノ
   11月8日(日) 21:48:35     43880
鳥人
今回のは難かった.マサルさんそして一位のアミーさんあっぱれ
   11月8日(日) 21:51:01     43881
???
Option Explicit
Dim a(14) As Integer
Sub Macro1()
Cells(1, 1).Value = 0
a(1) = 1
Call saiki(2)
End Sub
Sub saiki(ByVal n As Integer)
Dim dame As, b(14) As Integer, j As Integer
a(n) = 2
While a(n) <= 14
If n = 2 Then
dame = -(a(2) > 4)
Else
Select Case a(n - 1)
Case 2 : dame = 1 + (a(n) = 3 Or a(n) = 4)
Case 3, 5, 7, 9, 11
dame = 1 + (a(n) = a(n - 1) - 2 Or a(n) = a(n - 1) - 1 Or a(n) = a(n - 1) + 1 Or a(n) = a(n - 1) + 2 Or a(n) = a(n - 1) + 3)
Case 4, 6, 8, 10, 12
dame = 1 + (a(n) = a(n - 1) - 3 Or a(n) = a(n - 1) - 2 Or a(n) = a(n - 1) - 1 Or a(n) = a(n - 1) + 1 Or a(n) = a(n - 1) + 2)
Case 13
dame = 1 + (a(n) = 11 Or a(n) = 12 Or a(n) = 14)
Case 14
dame = 1 + (a(n) = 11 Or a(n) = 12 Or a(n) = 13)
End Select
End If
If dame = 0 Then
For j = 1 To 14 : b(j) = 0 : Next j
For j = 1 To n - 1 : b(a(j)) = 1 : Next j
If b(a(n)) = 0 Then
If n < 14 Then
Call saiki(n + 1)
ElseIf a(14) = 13 Or a(14) = 14 Then
Cells(1, 1).Value = Cells(1, 1).Value + 1
For j = 1 To 14
Cells(Cells(1, 1).Value, j + 1).Value = a(j)
Next j
End If
End If
End If
a(n) = a(n) + 1
Wend
End Sub
   11月9日(月) 10:44:56     43882

過去問題一覧へ戻る