Example #1
0
int main() {
    Solution s;
    for (int i = 0; i < 101; ++i) {
        cout << i << " : " << s.NumberOf1Between1AndN_Solution(i) << endl;
    }
    cout << 345 << " : " << s.NumberOf1Between1AndN_Solution(345) << endl;
    cout << 2345 << " : " << s.NumberOf1Between1AndN_Solution(2345) << endl;
    cout << 824883294 << " : " << s.NumberOf1Between1AndN_Solution(824883294) << endl;
    return 0;
}
Example #2
0
int main()
{

	Solution a;

	cout << a.NumberOf1Between1AndN_Solution(100) << ' ';
	system("pause");
	return 0;
}