#include <stdio.h> int main() { int s,count=0; scanf("%d",&s); int a[s]; for(int i=0;i<s;i++) scanf("%d",&a[i]); for(int i=0;i<s;i++){ count=0;//make count every time 0 to reuse for another number for(int j=i+1;j<s;j++){ if(a[i]==a[j]){ count++;//get count of each number for(int k=j;k<s-1;k++) a[k]=a[k+1];//need to remove the duplicate numbers s--; j--; } } if(count==0)//if unique element is present count will be remain as 0 printf("%d ",a[i]); } }