Cod sursa(job #911756)
| Utilizator | Data | 11 martie 2013 20:49:56 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.47 kb |
program text_infoarena;
var c:char; x,nrc,nrl,aux:longword;
f,g:text;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
nrl:=0; nrc:=0; aux:=0;
while not eof(f) do
begin
read(f,c);
if (((c>='a')and(c<='z')) or ((c>='A')and(c<='Z')))then inc(aux)
else begin
if (aux>0)then inc(nrc);
inc(nrl,aux); aux:=0;
end;
end;
x:=nrl div nrc;
writeln(g,x);
close(f); close(g);
end.
