Constaints and Test Case Failed

My code is perfectly runs well, best test case failed and also please explain about constaints.
import java.util.Scanner;

public class Main{

public static void main(String[] args) {

	Scanner s = new Scanner(System.in);
	int n = s.nextInt();
	int nst = 1;
	int row = 1;
	while (row <= n) {
		for (int cst = 1; cst <= nst; cst++) {
			if (cst == 1 || cst == nst) {
				System.out.print(row);}
			else {
				System.out.print("0");}
		}
		System.out.println();
		nst++;
		row++;
	}
    }
}

You are not printing the values according to the question .You have to manage space between no according to the output shown.Check it again you will get it where you are doing wrong.Constraint is simple you have to give the value of n between 1 to 100.