Cod sursa(job #584604)
Utilizator | Data | 26 aprilie 2011 09:04:46 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.3 kb |
var c:char;
g,s,u:longint;
begin
assign(input,'text.in');reset(input);
assign(output,'text.out');rewrite(output);
while not eoln(input) do begin
read(c);
if (upcase(c) in['A'..'Z']) then inc(g) else begin
if g<>0 then begin
s:=s+g;
inc(u);
g:=0;
end;
end;
end;
write(s div u);
end.