https://www.acmicpc.net/problem/10992
import java.util.*
fun main(args: Array<String>) {
val s=Scanner(System.`in`)
var n=s.nextInt()
for(i in 1 until n){
for(j in n-i downTo 1) print(" ");
print("*");
for(j in 0 until (i-2)*2+1) print(" ");
if(i!=1) print("*");
println();
}
for(i in 0 until (n-1)*2+1) print("*");
}