APCS 觀念題 10503 - 24、25 (易) 解析
本帖最後由 葉桔良 於 2023-1-28 14:45 編輯
24
g(4)
i j
-------------------
1 j=j+f(1) 6
2 j=j+f(2) 11
3 j=j+f(3) 13
f(1)
=1+f(2)
=1+3+f(3)
=1+3+1+f(4)
=1+3+1+1
=6
f(2) = 5
f(3) = 2
25
Mystery(9)
->Mystery(7){13} + Mystery(8){21}
Mystery(8)
->Mystery(6){8} + Mystery(7){13}
Mystery(7)
->Mystery(5){5} + Mystery(6){8}
Mystery(6)
->Mystery(4){3} + Mystery(5){5}
Mystery(5)
->Mystery(3){2} + Mystery(4){3}
Mystery(4)
->Mystery(2){1} + Mystery(3){2}
Mystery(3)
->Mystery(1){1} + Mystery(2){1}
Mystery(2)
->Mystery(0){0} + Mystery(1){1} |