Cod sursa(job #799822)
Utilizator | Data | 20 octombrie 2012 10:10:50 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.34 kb |
var s:string; n,t,i,m,j:integer;f,g:text; const sp=[' ','-'];
begin
assign (f,'text.in');reset(f);
assign (g,'text.out');rewrite(g);
readln(f,s);
n:=length(s);
for i:=1 to n do
if (s[i]>='A') and (s[i]<='z')then j:=j+1
else if (i>2) and (s[i] in sp) then m:=m+1;;
writeln (g,j div (m+1));
close(f);close(g);
end.