- 剑指 Offer 17. 打印从1到最大的n位数
-
- 面试的时候要考虑大数 ,思路是
//大数问题用string保存数字 前导0可以用atoi或者stoi
//函数原型 int atoi(const char* s) int stoi(string s) string转const char*方法:利用string类中的方法 s.c_str()
-
- 看提交结果,是有优化空间的?,果然
//大数问题用string保存数字 前导0可以用atoi或者stoi
//函数原型 int atoi(const char* s) int stoi(string s) string转const char*方法:利用string类中的方法 s.c_str()