|
|
вернуться в форумWrong answer 7. help please. pascal Послано Lena 1 май 2015 10:47 var a:array[1..101] of string; b:array[1..101] of integer; k,n,i,j,t,max,p:integer; x:string; begin k:=1; readln(n); readln(x); a[1]:=x; for i:=2 to n do begin readln(x); for j:=1 to k do if x=a[j] then b[j]:=b[j]+1; for j:=1 to k do if x<>a[j] then a[k+1]:=x; k:=k+1; end; for t:=1 to n do if b[t]>=max then max:=b[t]; for p:=1 to n do if b[p]=max then writeln(a[p]); end. |
|
|