题解 | #打印从1到最大的n位数#
打印从1到最大的n位数
http://www.nowcoder.com/practice/4436c93e568c48f6b28ff436173b997f
class Solution {
public:
vector<int> printNumbers(int n) {
vector<int> arr;
int i=pow(10,n)-1;
for(int j=1;j<=i;j++)
arr.push_back(j);
return arr;
}
};