|
|
вернуться в форумWhy WA1? int n = in.nextInt(); int l = 0; if (n > 24) { out.print("Glupenky Pierre"); } else { for (int i = 1; i <= n; i++) { if (i / 5 == 0) l = 0; if (i / 5 == 1) l = 1; if (i / 5 == 2) l = 8; if (i / 5 == 3) l = 6; if (i / 5 == 4) l = 9; if (i % 5 == 0) l = l * 10; if (i % 5 == 1) l = l * 10 + 1; if (i % 5 == 2) l = l * 10 + 8; if (i % 5 == 3) l = l * 10 + 6; if (i % 5 == 4) l = l * 10 + 9; if (l/10==0) out.print("0"); out.print(l); out.print(" "); } } Edited by author 07.11.2016 22:26 Edited by author 07.11.2016 22:27 |
|
|