Posted on March 22, 2021March 22, 2021 Description Submission class Solution { public: int numberOfSteps (int num) { int ret = 0; for(; num; ret++) { if(num % 2 == 0) num >>= 1; else num -= 1; } return ret; } }; By Bill0412 Easy LeetCode