Cod sursa(job #524892)
| Utilizator | Data | 23 ianuarie 2011 15:46:20 | |
|---|---|---|---|
| Problema | Text | Scor | 40 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.4 kb |
var s:string;
f,g:text;
j,c,i:longint;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
read(f,s);
j:=0; c:=0;
for i:=1 to length(s) do
begin
if s[i] in ['a'..'z','A'..'Z'] then j:=j+1;
if (not(s[i] in ['a'..'z','A'..'Z'])) and (s[i-1] in ['a'..'z','A'..'Z']) then c:=c+1;
end;
if s[i] in ['a'..'z','A'..'Z'] then c:=c+1;
j:=j div c;
write(g,j);
close(f);close(g);
end.
