public static void getArr(int n, int m, int[] a) {List<Integer> lists = new ArrayList<Integer>(); int flag = 0; int k = 0; int count = 0; while(count < n) { if(k == m) k = 0; lists.add(a[k]); for(int i = 0; i < lists.get(count) - 1; i++) { lists.add(a[k]); } k++; count++; } System.out.println(lists.size()); for (int j = 0; j < n; j++) System.out.println(lists.get(j)); }
点赞 评论

相关推荐

程序员小白条:你是沟通了900个,不是投了900份简历,你能投900份,意味着对面都要回复你900次,你早就找到实习了,没亮点就是这样的,别局限地区,时间投的也要早,现在都要7月了
点赞 评论 收藏
分享
在等offer的火锅...:我去履历这么好,都找不到工作吗?
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务