Pagini recente » Cod sursa (job #2246758) | Cod sursa (job #1236148) | Cod sursa (job #1036938) | Cod sursa (job #3234619) | Cod sursa (job #1051184)
Program text_infoarena;
const lmic=['a'..'z']; lmare=['A'..'Z'];
var f,g:text;
i,l,k:longint;
c:char;
ok:boolean;
BEGIN
assign(f,'text.in'); reset(f);
assign(g,'text.out'); rewrite(g);
l:=0; k:=1; ok:=false;
while (not(eof(f))) do
begin
read(f,c);
if ((c in lmic) or (c in lmare)) then inc(l);
if (((c in lmic) or (c in lmare)) and (not(ok)))
then
begin
ok:=true;
inc(k);
end;
if (not((c in lmic) or (c in lmare)) and (ok))
then
begin
ok:=false;
end;
end;
writeln(g,trunc(l/k));
close(f); close(g);
END.