Check the following code , it is getting wrong answer in 1 of test cases

import java.util.*;
public class Main {
public static void main(String args[]) {
// Your Code Here
Scanner sc=new Scanner(System.in);
int T=sc.nextInt();
while(T>0){
long n=sc.nextLong();
int k=sc.nextInt();
kthroot(n,k);
T–;
}
}
public static void kthroot(long n, int k){
long x=(long)Math.pow(n,(1.0/k));
System.out.println(x);
}
}
please get it done soon