Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- import java.io.*;
- import java.math.*;
- /**
- * Auto-generated code below aims at helping you parse
- * the standard input according to the problem statement.
- **/
- class Solution {
- public static void main(String args[]) {
- Scanner in = new Scanner(System.in);
- int n = in.nextInt();
- if (in.hasNextLine()) {
- in.nextLine();
- }
- String c = in.nextLine();
- char[][] muffin = new char[5][9];
- String[] tmp = new String[5];
- tmp[0] = " ___ ";
- tmp[1] = " _(*_*)_ ";
- tmp[2] = "(_ o _)";
- tmp[3] = " /-o-\\ ";
- tmp[4] = " (_/ \\_) ";
- for(int i = 0; i < 5; i++)
- {
- for(int j = 0; j < 9; j++)
- {
- muffin[i][j] = tmp[i].toCharArray()[j];
- }
- }
- char[][] mat = new char[5+n+n][9+n+n];
- for(int i = 0; i < 5+n+n; i++)
- {
- for(int j = 0; j < 9+n+n; j++)
- {
- mat[i][j] = c.charAt(0);
- }
- }
- for(int i = n; i< n+5; i++)
- {
- for(int j = n; j < n+9; j++)
- {
- mat[i][j] = muffin[i][j]; ///////////////////////////////// ici changer i et j car on part de n à n+length donc
- //////////////////////////////// pour muffin[i][j] ça passe pas
- }
- }
- //
- for(int i = 0; i < 5+n+n; i++)
- {
- for(int j = 0; j < 9+n+n; j++)
- {
- System.out.print(mat[i][j]);// = c.charAt(0);
- }
- System.out.println();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement