Click Here to go back to the homepage.

Skener Solution:


import java.util.Scanner;

public class Skener{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int r = sc.nextInt();
        int c = sc.nextInt();
        int zr = sc.nextInt();
        int zc = sc.nextInt();
        for (int i = 0; i < r+1; i++){ //for input rows
            String[] line = sc.nextLine().split("");
            
            String output = "";
            for (int idk = 0; idk < line.length; idk++){ //for c
                for (int k = 0; k < zc; k++){ //for zc
                    output += line[idk];
                }
            }
            for (int j = 0; j < zr; j++){ //for output rows
                System.out.println(output);
            }
        }
    }
}