Cod sursa(job #508181)
| Utilizator | Data | 7 decembrie 2010 18:54:30 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.69 kb |
const f='text.in'; g='text.out';
var
i,s,nr,t:longint;
stop:boolean;
c:char;
begin
assign(input,f);reset(input);
assign(output,g);rewrite(output);
s:=0;nr:=0;
stop:=false;
while not eof(input) do
begin
if (c>='a') and (c<='z') or (c>='A') and (c<='Z') then
begin
inc(s);
stop:=true;
end
else
if stop then
begin
stop:=false;
inc(nr);
end;
end;
if stop then inc(nr);
t:=s div nr;
write(t);
close(input);close(output);
end.