Python 基礎教程
Python 內置函數
python divmod() 函數把除數和余數運算結果結合起來,返回一個包含商和余數的元組(a // b, a % b)。
在 python 2.3 版本之前不允許處理復數。
divmod(a, b)
參數說明: