import java.util.Scanner; public class Main5 {     public static void main(String[] args) {         Scanner in = new Scanner(System.in);         int t = in.nextInt();         long[] arr = new long[t];         for (int i = 0; i < t; i++) {             arr[i] = in.nextLong();         }         for(long N : arr){             fun(N);         }     }     public static void fun(long N){         if(N%2 != 0){             System.out.println("No");             return ;         }         long X = 0;         long Y = 0;         for(int i=1;i<=N/2;i++){             Y = i*2;             if(N%Y == 0){                         X = N/Y;                 if(X%2!=0){                     System.out.println(X+" "+Y);                     return ;                 }             }         }     } 已AC通过!
点赞 4

相关推荐

10-25 23:12
门头沟学院 Java
点赞 评论 收藏
分享
牛客网
牛客企业服务