#28748: Python 解答


oxxostudio (oxxo.studio)

學校 : 不指定學校
編號 : 173961
來源 : [220.133.228.250]
最後登入時間 :
2022-07-21 09:26:00
a524. 手機之謎 | From: [122.117.124.140] | 發表日期 : 2021-12-30 10:13

因為要算出密碼的所有排列組合,
所以可以使用 Python 標準函式庫 itertools 裡的 permutations 來實作,
先將指定範圍的數字改成文字串列,再透過 permutations 算出所有排列組合,
最後將這些組合列出即可。

解答:https://steam.oxxostudio.tw/category/python/zerojudge/a524.html

 
ZeroJudge Forum