热门

最新

红包

立Flag

投票

同城

我的

发布
brucezhouxin
brucezhouxin
3 年前
truebrucezhouxin

ai能力无处不在

谛听安全内容审核干货!分享内容审核中容易疏漏的点

CSDN App 扫码分享
分享
评论
1
打赏
  • 复制链接
  • 举报
下一条:
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()); } } }}
立即登录