Advertisement
Guest User

Untitled

a guest
Feb 18th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.  
  5. int x, y, n, i, flag = 0;
  6. double t;
  7.  
  8. scanf("%d",&n);
  9.  
  10. for(i = 0; i < n; i++){
  11. flag = 0;
  12. scanf("%d",&x);
  13.  
  14. if(x == 1 || x == 2 || x == 3){
  15. flag = 0;
  16. }else{
  17. y = sqrt(x);
  18. t = sqrt(x);
  19. if(y == t){
  20. flag = 1;
  21. }
  22. }
  23. if(flag == 1){
  24. printf("YES\n");
  25.  
  26. }else{
  27. printf("NO\n");
  28.  
  29. }
  30. }
  31.  
  32.  
  33. return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement