AC代码:
#include<iostream>
#include<iomanip>
#include<math.h>
#include<stdio.h>
#include <algorithm>
using namespace std;
int main()
{
int i, j, number[10], flag;
while (cin >> number[0])
{
for (i = 1; i < 10; i++)
cin >> number[i];
cout << number[0];
for (i = 1; i < 10; i++)
{
flag = 1;
for (j = 0; j < i; j++)
{
if (number[i] == number[j]) {
flag = 0;
break;
}
}
if (flag)
cout << " " << number[i];
}
cout << endl;
}
return 0;
}