https://www.acmicpc.net/problem/10991
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("*");
if(i!=1) for(int j=0;j<i-1;j++) System.out.print(" *");
System.out.println();
}
}
}