-3
需要一些幫助來在Python中編寫一個Persistent number程序來確定持續性爲 (715 ---> 35 ---> 15 ---> 5)爲3的最小非負整數,然後如圖4所示,然後如圖5所示,然後如圖6所示,然後7.具有下列格式的輸出:Python持久號碼
The smallest integer with a persistence of 3 is: 39
The smallest integer with a persistence of 4 is: xx
The smallest integer with a persistence of 5 is: xxx
The smallest integer with a persistence of 6 is: xxxx
The smallest integer with a persistence of 7 is: xxxxx
任何代碼鏈接或引線,將不勝感激,謝謝。
這本來是有幫助的,以提供一個什麼樣的數量的持久性是一個解釋的解釋或[鏈接](http://en.wikipedia.org/wiki/Persistence_of_a_number),而不是僅僅提供不可思議的715→35→15→5序列。另外,如果你認爲這個網站是一個供人們爲你提供代碼的地方,那麼你的網站就是錯誤的。 – user2357112 2015-04-01 00:27:27
重複[http://stackoverflow.com/questions/7973690/computing-persistence-number-of-an-integer](http://stackoverflow.com/questions/7973690/computing-persistence-number-of-an -integer) – koukouviou 2015-04-01 00:30:57
@ user2357112:感謝您的鏈接。我只看到了之前的增加數字類型的持久性。我不知道還有其他類型的,比如OP所指的多位數版本。 – 2015-04-01 05:37:36