first commit

This commit is contained in:
Nyagami
2022-12-15 23:51:04 +07:00
commit 87d51fb251
292 changed files with 12623 additions and 0 deletions
@@ -0,0 +1,26 @@
import java.util.Scanner;
public class Main {
static long[] f = new long[2000001];
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
long t = reader.nextLong();
for (long i = 0; i < t; i++) {
long ans=1;
long a=reader.nextLong();
for(long j=2;j<=(long)Math.sqrt(a);j++){
if(a%j==0){
ans=j;
while(a%j==0){
a/=j;
}
}
}
if(a>1) ans=a;
System.out.println(ans);
}
reader.close();
}
}