My issue
why is hidden test case failing
My code
import java.util.*;
import java.lang.*;
import java.io.*;
class Codechef {
public static void main(String[] args) throws java.lang.Exception {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int i = 0; i < t; i++) {
int n = sc.nextInt();
System.out.println(n);
if (n % 2 == 0) {
System.out.println(2);
} else {
System.out.println((n * n) / 2 + 2);
}
}
sc.close();
}
}
Problem Link: Chess Colouring Practice Coding Problem