Cod sursa(job #1980)
Utilizator | Breta Ionut th3whu2 | Data | 15 decembrie 2006 16:00:15 |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.4 kb |
var f,g:text;
s:string;
l,cuv,i:longint;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
read(f,s);
l:=0;
cuv:=0;
for i:=1 to length(s) do
begin
if s[i] in ['a'..'z','A'..'Z'] then inc(l);
if (not(s[i] in ['a'..'z','A'..'Z'])) and (s[i-1] in ['a'..'z','A'..'Z']) then inc(cuv);
end;
if s[i] in ['a'..'z','A'..'Z'] then inc(cuv);
write(g,l div cuv);
close(f);
close(g);
end.