Python實現"3的冪"的兩種方法

給定一個整數,寫一個函數判斷它是不是3的冪html Example 1:python Input: 27 Output: true Example 2:算法 Input: 0 Output: false Example 3:函數 Input: 9 Output: true Example 4:spa Input: 45 Output: false 進階:code 你能不適用循環或者迭代完成這個題麼
相關文章
相關標籤/搜索