Pagini recente » Cod sursa (job #898819) | Cod sursa (job #5460) | Cod sursa (job #385474) | Cod sursa (job #2946713) | Cod sursa (job #649672)
Cod sursa(job #649672)
var s:string;i,k,c:integer;f,g:text;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
c:=0;k:=0;
read(f,s);
for i:=1 to length(s) do begin
if ((s[i]<'A')or(s[i]>'z')or((s[i]>'Z')and(s[i]<'a')))and((s[i+1]>='A')and(s[i+1]<='z')) then inc(k);
if ((s[i]>='A')and(s[i]<='Z'))or((s[i]>='a')and(s[i]<='z')) then inc(c);end;
if c>0 then
write(g,c div k) else write(c);
close(f);close(g);
end.