1041

版权声明:// Copyright © 2018年 Coding18. All rights reserved. https://blog.csdn.net/Coding18/article/details/86320689
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int hashtable[100010] = {0};
int main()
{
	int n,u;
	scanf("%d",&n);
	int a[n];
	for(int i = 0; i < n; i++)
	{
		scanf("%d",&a[i]);
		hashtable[a[i]]++;
	}
	int i;
	for(i = 0; i < n; i++)
	{
		if(hashtable[a[i]] == 1) 
		{ 
			printf("%d\n",a[i]);
			break;
		}
	}
	if(i == n) printf("None\n");
	return 0;
} 

猜你喜欢

转载自blog.csdn.net/Coding18/article/details/86320689