Cod sursa(job #291592)
Utilizator | Lazari Mihai mlazari | Data | 30 martie 2009 02:13:20 |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | fpc | Status | done |
Runda | The Beginners | Marime | 0.44 kb |
Program PText;
var c1,c2 : char;
n,l : longint;
f : text;
begin
n:=0;
l:=0;
c1:='*';
assign(f,'text.in');
reset(f);
while not eof(f) do
begin
read(f,c2);
if (c2 in ['A'..'Z','a'..'z']) then
begin
l:=l+1;
if not (c1 in ['A'..'Z','a'..'z']) then n:=n+1;
end;
c1:=c2;
end;
close(f);
assign(f,'text.out');
rewrite(f);
write(f,l div n);
close(f);
end.