请问一下 这个第二题是我是不是理解哪里有问题,为啥通过率是0啊
![](https://uploadfiles.nowcoder.com/images/20220815/318889480_1660553763785/633964BDAA77359C8A3CD2F94A8651FD)
public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int k = in.nextInt(); PriorityQueue<Integer> queue = new PriorityQueue<>(); for (int i = 0; i < n; i++) { queue.offer(in.nextInt()); } int count = 0; while (!queue.isEmpty()){ Integer poll = queue.poll(); if(!queue.isEmpty() && poll.equals(queue.peek())){ poll+=k; queue.poll(); queue.offer(poll); count++; } } System.out.println(count); }