![]() |
|
#1
|
|||
|
|||
![]() Решаю задачу по программированию и вылезает такая вот ошибка.
Собственно код: Код:
begin assign(input,'lookandsay.in'); readln(n); setlength(str,n); for i:=1 to n do begin readln(st); m:=length(st); for y:=1 to m-1 do begin if st[y]=st[y+1] then k:= k+1 else begin str[i]:=str[i]+inttostr(k)+st[y]; k:=1; end;//else end;// for y end;//for i assign(output,'lookandsay.out'); for i:=1 to n do writeln(str[i]); end. Подскажите, где ошибка. Заранее спасибо. |