import java.util.Scanner; public class  a{     public static void main(String[] args) {         Scanner scanner=new Scanner(System.in);                 int n=scanner.nextInt();         long[][] a=new long[n][2];         for(int i=0;i<n;i++){             a[i][0]=scanner.nextLong();             a[i][1]=scanner.nextLong();                     }         for(int i=0;i<n;i++){             System.out.println(printY(a[i][0],a[i][1]));         }     }     public static long printY(long a,long a2){         long i=0;         int count=0;         while(count<a2){             if((a+i)==(a|i)){                 count++;             }             i++;         }                 return i;             }      } 是这样吗?但是我的是超时的,然后通过率是0,哎花了好长时间....大佬能帮我解答一下吗?
点赞 4

相关推荐

许愿一个offer_...:不是啊,这个只代表你的面试官提交了你的面评,面试是否通过还是要看官网状态呢
腾讯2025实习生招聘
点赞 评论 收藏
分享
04-08 16:35
门头沟学院 Java
站队站对牛:实在是恶心的公司
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务