You are viewing a single comment's thread. Return to all comments →
public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); String str="#"; for (int i=0;i<n;i++) { System.out.printf("%"+(n+1)+"s",str+"\n"); str=str+"#"; } } }
I inspired by your solution.
Staircase
You are viewing a single comment's thread. Return to all comments →
I inspired by your solution.