Pagini recente » Cod sursa (job #2203784) | Cod sursa (job #545536) | Cod sursa (job #2456845) | Cod sursa (job #1536540) | Cod sursa (job #33069)
Cod sursa(job #33069)
const m=['a'..'z','A'..'Z'];
var s:char;
l,c:longint;
f,g:text;
ok:boolean;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
c:=0;l:=0;ok:=false;
while not eof(f) do begin
read(f,s);
if s in m then
if ok then inc(l)
else begin
ok:=true;
inc(l);
inc(c);
end
else ok:=false;
end;
if l=0 then writeln(g,'0')
else writeln(g,l div c);
close(g);
end.