Pagini recente » Cod sursa (job #417631) | Cod sursa (job #390482) | Cod sursa (job #2174459) | Cod sursa (job #123966) | Cod sursa (job #664849)
Cod sursa(job #664849)
{text 100p infoarena }
var i,n,nr_lit,nr_cuv: longint;
t:array[1..20000]of char;
f,g:text;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
while(not eoln(f)) do begin n:=n+1;read(f,t[n]);end;
for i:=1 to n do
if((t[i]>='a')and(t[i]<='z')or(t[i]>='A')and(t[i]<='Z')) then inc(nr_lit);
for i:=1 to n do
if((t[i]>='a')and(t[i]<='z')or(t[i]>='A')and(t[i]<='Z'))and
not((t[i+1]>='a')and(t[i+1]<='z')or(t[i+1]>='A')and(t[i+1]<='Z'))then inc(nr_cuv);
writeln(g,nr_lit div nr_cuv);
close(f);close(g);
end.