Datasets:

ArXiv:
License:
File size: 546 Bytes
c574d3a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import java.util.*;
public class Main{

  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    int t= sc.nextInt();

    while(t-->0){

     Set<Integer> s =new HashSet<Integer>();
      long n = sc.nextInt();

      int k,l;
      int j;
      for(int i = 1; i <n; i++){
          

        for(j = 1; j<n; j++){

          if(i!=j){
            System.out.println(i+" "+j);




          }

                            }
        System.out.println();
        }
      
  

        }
        
    }

    }