結果 : implement find s algorithm in python