卡塔库栗 • 3个月前
#include <stdio.h>
int a[1000005];
int main () {
int n, count = 0;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
if (a[i] == a[j]) {
count++;
}
}
if (count == 1) {
printf("%d ", a[i]);
}
count = 0;
}
return 0;
}
评论:
请先登录,才能进行评论