Mai intai trebuie sa te autentifici.
Cod sursa(job #26465)
| Utilizator | Data | 5 martie 2007 17:17:19 | |
|---|---|---|---|
| Problema | A+B | Scor | 0 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.54 kb |
program platou;
var a,b,c:array[1..100] of integer;
n,k,p,i:integer;
begin
readln(n);
for i:=1 to n do
begin
readln(n);
end;
k:=1;
b[1]:=1;
for i:=1 to n-1 do
begin
if b[k]=1 then
begin
b[k]:=1; c[k]:=a[i];
end;
begin
if a[i]=a[i+1] then
begin
b[k]:=b[k]+1;
end
else
begin
k:=k+1; b[k]:=1;
end;
end;
end;
for i:=1 to k do
write (c[k],' este de ',b[k]);
readln
end.
