Cod sursa(job #602989)
| Utilizator | Data | 13 iulie 2011 23:33:37 | |
|---|---|---|---|
| Problema | Text | Scor | 90 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.47 kb |
var s,p,k:int64;
procedure citire;
var c:char;f:text;
begin
assign(f,'text.in');
reset(f);
k:=0;p:=0;s:=0;
while not eof(f) do
begin
read(f,c);
if ((ord(c)>=65)and(ord(c)<=90))or((ord(c)>=97)and(ord(c)<=122)) then begin inc(s); inc(p);end else
if p>0 then begin inc(k); p:=0; end;
end;
close(f);
end;
procedure afis;
var f:text;
begin
assign(f,'text.out');
rewrite(f);
writeln(f,s/k);
close(f);
end;
begin
citire;
afis;
end.
