Test case error

import java.util.*;
import java.util.Scanner;
public class Main {
public static void main(String args[]) {

		Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	System.out.println(n/n);
	for (int i= 2; i<= n; i++)
	{
		for (int j= 1; j<=i; j++) 
		{	if(i>n/2) {
			if(j==1 || j==i) {
				System.out.print(i-1);
			}
			else {
				System.out.print("0");
			}
		}
			else {
				System.out.print(i-1);
			}
		}
		System.out.println('\t');
	}
}

}

//this is the code,but one test case is not passing

@vaibhavvishal98 try to dry run your code for 6 or 8 you get 222 which should be 202