https://www.acmicpc.net/problem/10990
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int n=s.nextInt();
for(int i=1;i<=n;i++){
for(int j=n-i;j>0;j--) System.out.print(" ");
System.out.print("*");
for(int j=0;j<(i-2)*2+1;j++) System.out.print(" ");
if(i!=1) System.out.print("*");
System.out.println();
}
}
}