solution
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Main
{
public static void solution(int N){
for(int ctr=0;ctr<N;ctr++){
for(int itr=0;itr<N;itr++){
if(ctr<=itr){
system.
out.
print((char)('A'+itr
));
}
else{
}
}
for(int itr=N-2;itr>=0;itr--){
if(itr>=ctr){
system.
out.
print((char)('A'+itr
));
}
else{
}
}
}
}
{
// your code goes here
Scanner sc =
new Scanner
(system.
in);
int N = sc.nextInt();
solution(N);
}
}
Parsed in 0.032 seconds