摘要:
https://www.cnblogs.com/grandyang/p/4741934.html class Solution { public: bool isUgly(int num) { if(num<=0) return false; while(num%2==0) num/=2; whil 阅读全文
摘要:
class Solution { public: int addDigits(int num) { while(num>=10) { int sum=0; while(num) { sum+=num%10; num/=10; } num=sum; } return num; } }; 阅读全文