当前位置: 代码迷 >> 综合 >> HDOJ 1563 Find your present!
  详细解决方案

HDOJ 1563 Find your present!

热度:19   发布时间:2023-10-21 19:12:26.0

HDACM 1563

异或的运用
同2095

import java.util.Scanner;public class Main{public static void main(String[] args) {Scanner sc = new Scanner(System.in);while (sc.hasNext()) {int n = sc.nextInt();if (n==0) {break;}int num = sc.nextInt();n--;while (n-->0) {num = num^sc.nextInt();}System.out.println(num);}sc.close();}
}
  相关解决方案