class Solution { public: int NumberOf1Between1AndN_Solution(int n) { if(n<=) return ; int count=; int i=; while(i<=n) { int p=i; while(p) { if(p%==) count++; p=p/; } i++; } return count; } };