Cod sursa(job #133075)
| Utilizator | Data | 7 februarie 2008 14:07:44 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.5 kb |
var f,g:text;
c:char;
cuv,lit:longint;
ok:boolean;
begin
assign(f,'text.in'); reset(f); assign(g,'text.out'); rewrite(g);
ok:=false;
while not eof(f) do begin
read(f,c);
if ok and (((c>='a')and(c<='z'))or((c>='A')and(c<='Z'))) then inc(lit)
else if ok then ok:=false
else if not ok and (((c>='a')and(c<='z'))or((c>='A')and(c<='Z'))) then begin
inc(cuv);
inc(lit);
ok:=true;
end;
end;
write(g,lit div cuv);
close(g);
end.
