Cod sursa(job #36957)
| Utilizator | Data | 24 martie 2007 13:01:56 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.52 kb |
const abc:set of char=['a'..'z','A'..'Z'];
var s,lit,nrcuv:int64;
c:char;
f,g:text;
begin
assign(f,'text.in');
assign(g,'text.out');
reset(f);
rewrite(g);
while not eof(f) do begin
read(f,c);
if (not (c in abc)) and (lit<>0) then begin
inc(s,lit);
lit:=0;
inc(nrcuv);
end;
if c in abc then
inc(lit);
end;
inc(s,lit);
if lit<>0 then inc(nrcuv);
writeln(g,trunc(s/nrcuv));
close(f);
close(g);
end.
