Cod sursa(job #49487)
Utilizator | Alex Mircescu alex_mircescu | Data | 5 aprilie 2007 20:09:36 |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.55 kb |
var u,cuv:longint;
ch:char;
lit:set of char;
cuvant:byte;
begin
assign(input,'text.in');
assign(output,'text.out');
reset(input);
rewrite(output);
lit:=['A'..'Z','a'..'z'];
cuv:=0;
u:=cuv;
cuvant:=0;
while not eoln do
begin
read(ch);
if ch in lit then
begin
cuvant:=1;
inc(u);
end;
if (not (ch in lit)) and (cuvant=1) then
begin
cuvant:=0;
inc(cuv);
end;
end;
if cuvant=1 then
begin
inc(cuv);
end;
write(u div cuv);
close(input);
close(output);
end.