Pagini recente » Cod sursa (job #1082121) | Cod sursa (job #2563836) | Cod sursa (job #1267626) | Cod sursa (job #1642848) | Cod sursa (job #175124)
Cod sursa(job #175124)
Program texte;
var s: string;
nc,nt,q,i: longint;
t: text;
Begin
assign(t,'text.in'); reset(t);
read(t,s);
close(t);
nc:=0;
nt:=0;
q:=0;
for i:=1 to length(s) do
begin
if s[i] in ['a'..'Z'] then begin
q:=1;
nt:=nt+1;
end
else if q<>0 then
begin
nc:=nc+1;
end;
end;
if s[length(s)] in ['a'..'Z'] then nc:=nc+1;
if (q=1) and (nc=0) then nc:=1;
assign(t,'text.out'); rewrite(t);
write(t,nt div nc);
close(t);
end.