Type str = array [1..100] of char;
var maxs, tmps : str;
count, max, tmp, ctmp : integer;
procedure reads (var s : str; var len, val : integer);
var
b : boolean;
c : char;
i : integer;
begin
i := 0; b := false;
repeat
read (c);
if not b or (c <> ) then
begin
if c = then b := true;
inc (i);
s[i] := c;
c := 1;
end;
until b and (c = );
len := i;
readln (val);
end;
begin
assign (input, input.txt); reset (input);
reads (maxs, count, max);
while not eof do
begin
reads (tmps, ctmp, tmp);
if tmp > max then
begin
max := tmp;
count := ctmp;
maxs := tmps;
end;
end;
for tmp := 1 to count do write (maxs[tmp]);
end.
Если ответ по предмету Информатика отсутствует или он оказался неправильным, то попробуй воспользоваться поиском других ответов во всей базе сайта.