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,29 @@
package nyagami;
import java.util.Scanner;
public class test{
public static void main(String[] arg){
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for(int i=1; i<=t; i++){
int n = sc.nextInt();
System.out.printf("Test %d: ",i);
int can = (int) Math.sqrt((double)n);
for(int j=2; j<=can; j++){
int cnt=0;
while(n%j==0){
n/=j;
cnt++;
}
if(cnt>0){
System.out.printf("%d(%d) ", j, cnt);
}
}
if(n>1) System.out.printf("%d(1)", n);
System.out.println("");
}
sc.close();
}
}