雖然題目是 3 的倍數 + 1 或 3 的倍數 + 2,實際上就是除以 3 的餘數為 1 或 2,只要透過 if 邏輯判斷,就能得到最後的結果。
解答:https://steam.oxxostudio.tw/category/python/zerojudge/a058.html