My issue
Plz debug this code
My code
import java.util.*;
import java.lang.*;
import java.io.*;
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
Scanner scanner = new Scanner(System.in);
long T = scanner.nextInt(); // Read the number of test cases
for (long i = 0; i < T; i++) {
long N = scanner.nextLong(); // Read N
double sqrtN = Math.sqrt(N);
long result = (long)sqrtN ;
if (N % 2 == 1) { // Odd N
result = (long)sqrtN +1 ; // Round up to nearest integer
}
result /= 2;
System.out.println(result);
}
}
}
Problem Link: Chef Product Practice Coding Problem - CodeChef