public class Main { number372(); } public static void number372(){ } public static class Calc { public static int[] calc(int start, int max) { int[] array = new int[max]; for (int count = 0, num = start; count < max; num += 3) { if (num % 7 != 2) { array[count++] = num; } } return array; } } public static class Print { int lineCount = 1; sb.append(lineCount++ + lineSeparator); for (int i = 0; i < array.length; i++) { sb.append(array[i]); if (i + 1 < array.length) { if ((i + 1) % lineMax == 0) { sb.append(lineCount++ + lineSeparator); } else { sb.append(elemSeparator); } } } return sb.toString(); } } }
Standard input is empty
1:3,6,12,15,18,21,24,27,33,36 2:39,42,45,48,54,57,60,63,66,69 3:75,78,81,84,87,90,96,99,102,105 4:108,111,117,120,123,126,129,132,138,141 5:144,147,150,153,159,162,165,168,171,174 6:180,183,186,189,192,195,201,204,207,210 7:213,216,222,225,228,231,234,237,243,246 8:249,252,255,258,264,267,270,273,276,279 9:285,288,291,294,297,300,306,309,312,315