- 문제풀이
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.nextLine());
int cnt = 1;
for(int i = 0 ; i < n ; i++) {
for(int j = 0 ; j < n ; j++) {
if(i <= j) {
if(cnt == 5) {
cnt = 1;
}
System.out.print(cnt++ * 2 + " ");
} else {
System.out.print(" ");
}
}
System.out.println();
}
}
}