剑指OFFER----面试题17- 打印从1到最大的n位数
链接:https://leetcode-cn.com/problems/da-yin-cong-1dao-zui-da-de-nwei-shu-lcof/
代码:
class Solution { public: vector<int> printNumbers(int n) { int res = pow(10, n); vector<int> tmp; for (int i = 1; i < res; ++i) tmp.push_back(i); return tmp; } };