import java.util.*;
public class Solution {
/**
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
*
*
* @param n int整型 最大位数
* @return int整型一维数组
*/
public int[] printNumbers (int n) {
// write code here
int len;
switch (n) {
case 1:
len = 9;
break;
case 2:
len = 99;
break;
case 3:
len = 999;
break;
case 4:
len = 9999;
break;
default:
len = 99999;
}
int[] res = new int[len];
for (int i = 0; i < len; i++) {
res[i] = i + 1;
}
return res;
}
}