#include<fstream.h> ifstream f("numere.txt"); void main() { long x,y,vmax; int n,k=1, max=0; f>>n; f>>x; while(f>>y) { if(x==y) k++; else { if(k>max) { max=k; vmax=x; } k=1; } x=y; } cout<<vmax<<" "<<max; }