Cod sursa(job #218799)
| Utilizator | Data | 3 noiembrie 2008 17:40:46 | |
|---|---|---|---|
| Problema | Text | Scor | 30 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.46 kb |
var
f,g:text;
nrcuv,stot,i:longint;
a:char;
begin
assign(f,'text.in');
reset(f);
assign(g,'text.out');
rewrite(g);
i:=1; stot:=0; nrcuv:=0;
while not eof(f) do begin
read(f,a);
if ((a>='a') and (a<='z')) or ((a>='A') and (a<='Z')) then
begin inc(stot); inc(i) end else
if ((a<'a') or (a>'z')) and ((a<'A') or (a>'Z'))
then begin inc(nrcuv); inc(i); end else inc(i); end;
close(f);
write(g,trunc(stot/nrcuv));
close(g);
end.
