👤

Cine poate sa mi scrie asta in pseudocod?
{int n, a, nr, b, k=0, p=1, i;
cin>>n>>a;
for(i=0;i<n-1;i++)
 {cin>>b;
if(a==b)
p++;
else
{
if(k<=p)
{k=p;
nr=a;}
a=b;
p=1;}}
for(i=0;i<k;i++)
cout<<nr<<" "; }