//de cate ori apare un nr ce se repeta
#include<iostream.h>
void main()
{
int aux,n,i,j,nr,a[20];
cout<<"n=";cin>>n;
for (i=1;i<=n;i++)
 {cout<<"a["<<i<<"]=";cin>>a[i];}
aux=-1;
for(i=1;i<=n;i++)
 {nr=1;
  if(a[i]!=aux)
   {for(j=i+1;j<=n;j++)
    if(a[i]==a[j]) {nr++;a[j]=aux;}
   cout<<"nr"<<a[i]<<"apare de "<<nr<<" ori";
   cout<<endl;}
  }
 }