热门

最新

红包

立Flag

投票

同城

我的

发布
m0_67609843
java丁真
3 年前
truem0_67609843

import java.util.*;

public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); while (cin.hasNext()) { int n=cin.nextInt(); HashMap<Integer,Boolean> hashSet=new HashMap<>(); for (int i = 0; i < n; i++) { int m= cin.nextInt(); if(hashSet.containsKey(m)){ hashSet.replace(m,false); } else hashSet.put(m,true); } for (Map.Entry<Integer, Boolean> entry : hashSet.entrySet()){ if (entry.getValue()) System.out.println(entry.getKey()); } } }
}

CSDN App 扫码分享
分享
评论
1
打赏
  • 复制链接
  • 举报
下一条:
打开中秋节快乐呀公司发月饼了吗
立即登录