int n = 4;
for ( int a = 1 ; a < 2*n ; a++) {
System.out.print("Q");
if ( a == 1 ) {
System.out.print(" ");
}
else {
for (int b = 0 ; b < ((a--) *2)+1; b++) {
System.out.print(" ");
}
}
System.out.println("Q");
}
vubec nevim proc me z tohohle zadani vybehne nekonecna smycka kde se furt opakujou "QQ" pod sebou