import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int T=sc.nextInt(); for (int i =1; i <= T; i++) { int n=sc.nextInt(); int cnt=0; boolean isP=true; lo:for (int j = 2; j*j <=n; j++) { while(n%j==0) { n/=j; cnt++; if(cnt>2){ System.out.println("No"); isP=false; break lo;} } } if(isP){ if(n>1){ cnt++; if(cnt!=2){ System.out.println("No"); } else{ System.out.println("Yes"); } } else{ System.out.println("Yes"); } } } } static boolean isPri(int n){ if(n<2)return false; for (int i = 2; i*i <=n; i++) { if(n%i==0)return false; } return true; } }
0.0分
0 人评分
C语言程序设计教程(第三版)课后习题9.10 (C语言代码)浏览:601 |
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)浏览:659 |
简单的a+b (C语言代码)浏览:548 |
C语言程序设计教程(第三版)课后习题7.4 (C语言代码)浏览:605 |
哥德巴赫曾猜测 (C语言代码)浏览:995 |
C语言程序设计教程(第三版)课后习题10.7 (C语言代码)浏览:958 |
C语言程序设计教程(第三版)课后习题1.5 (C++代码)浏览:757 |
三角形 (C++代码)记忆化搜索浏览:1222 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:669 |
Minesweeper (C语言描述,蓝桥杯)浏览:1125 |