Advertisement
roronoa

muffin man

Jul 12th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.65 KB | None | 0 0
  1. import java.util.*;
  2. import java.io.*;
  3. import java.math.*;
  4.  
  5. /**
  6.  * Auto-generated code below aims at helping you parse
  7.  * the standard input according to the problem statement.
  8.  **/
  9. class Solution {
  10.  
  11.     public static void main(String args[]) {
  12.         Scanner in = new Scanner(System.in);
  13.         int n = in.nextInt();
  14.         if (in.hasNextLine()) {
  15.             in.nextLine();
  16.         }
  17.         String c = in.nextLine();
  18.         char[][] muffin = new char[5][9];
  19.         String[] tmp = new String[5];
  20.         tmp[0] = "   ___   ";
  21.         tmp[1] = " _(*_*)_ ";
  22.         tmp[2] = "(_  o  _)";
  23.         tmp[3] = "  /-o-\\  ";
  24.         tmp[4] = " (_/ \\_) ";
  25.         for(int i = 0; i < 5; i++)
  26.         {
  27.             for(int j = 0; j < 9; j++)
  28.             {
  29.                 muffin[i][j] = tmp[i].toCharArray()[j];
  30.             }
  31.         }
  32.         char[][] mat = new char[5+n+n][9+n+n];
  33.         for(int i = 0; i < 5+n+n; i++)
  34.         {
  35.             for(int j = 0; j < 9+n+n; j++)
  36.             {
  37.                 mat[i][j] = c.charAt(0);
  38.             }
  39.         }
  40.         for(int i = n; i< n+5; i++)
  41.         {
  42.             for(int j = n; j < n+9; j++)
  43.             {
  44.                 mat[i][j] = muffin[i][j];       ///////////////////////////////// ici changer i et j car on part de n à n+length donc
  45.                                                 //////////////////////////////// pour muffin[i][j] ça passe pas
  46.             }
  47.         }
  48.         //
  49.         for(int i = 0; i < 5+n+n; i++)
  50.         {
  51.             for(int j = 0; j < 9+n+n; j++)
  52.             {
  53.                 System.out.print(mat[i][j]);// = c.charAt(0);
  54.             }
  55.             System.out.println();
  56.         }
  57.     }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement