最初のページ 戻る 次へ 最後のページ

solve(ANS,12).

choice([3,14,6,9],ANS),sum(ANS,12)

choice([3,14,6,9],ANS)

choice([14,6,9],ANS)

choice([6,9],ANS)

ANS=[0,0]

choice([9],ANS)

  ANS=[0]

choice([],ANS)

ANS=[]

choice([H|T],[0|Y]):-choice(T,Y).

Y=[0], ANS=[0|Y]

T=[9],Y=[0]

巻取り段階

巻取り段階