LeetCode 筆記 - 1342. Number of Steps to Reduce a Number to Zero
⚠️ 舊文提醒:本文發佈於約 4 年前,部分內容或指令可能已過時,請斟酌參考。
題目在此 1342. Number of Steps to Reduce a Number to Zero
給定一個數字,如果是雙數請 除以 2,不然就請減掉 1
解題思維
Just do it
程式碼
1 | class Solution: |
題目在此 1342. Number of Steps to Reduce a Number to Zero
給定一個數字,如果是雙數請 除以 2,不然就請減掉 1
Just do it
1 | class Solution: |