PAT A 1041
#include<cstdio>
using namespace std;
int vis[100005] = {0};
int num[100005] = {0};
int main()
{
int n,i;
scanf("%d",&n);
for(i = 0; i<n; ++i)
{
scanf("%d",(num+i));
vis[*(num+i)]++;
}
for(i = 0; i<n; ++i)
if(vis[*(num+i)]==1)
break;
if(i==n)
puts("None");
else
printf("%d\n",*(num+i));
return 0;
}

基恩士成长空间 446人发布