Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
115237 | 胡海峰老师 | 19买画笔 | C | Accepted | 0 MS | 208 KB | 489 | 2025-03-29 20:07:58 |
#include <stdio.h> int a[1000008]; int b[1000008]; int main(){ int n,found; scanf("%d",&n); //4 for(int i=1;i<=n;i++) scanf("%d",&a[i]); for(int i=1;i<=n ;i++) { if(a[i]==0) continue; found=0; for(int j=1;j<=n;j++) { if(i!=j && a[i]==a[j]) { a[i]=0; a[j]=0; found =1; break; } } if (found==0) { printf("%d",a[i]); break; } } return 0; } /* 9 1 1 9 11 5 3 11 5 9 */