import java.io.*;
class Main {
public static void main(String args[]) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(br.readLine());
for (int i = 1; i <= N; i++) {
int count = N - i;
for (int j = 0; j < N; j++) {
if (count != 0) {
System.out.print(" ");
count--;
} else {
System.out.print("*");
}
}
System.out.println();
}
}
}
해결방법