Pagini recente » prega_oni2015_9 | Cod sursa (job #607528) | Cod sursa (job #2843890) | Diferente pentru home intre reviziile 810 si 809 | Cod sursa (job #129733)
Cod sursa(job #129733)
var k,c:longint;
m:set of char;
f,g:text;
p:boolean;
ch:char;
begin
assign(f,'text.in');
reset(f);
assign(g,'text.out');
rewrite(g);
c:=0;
k:=0;
m:=['A'..'Z']+['a'..'z'];
p:=false;
while not seekeof(f) do
begin
while not eoln(f) do begin
read(f,ch);
if ch in m then begin
inc(k);
p:=True;
end
else
if p then begin
inc(c);
p:=False;
end;
end;
if ch in m then begin
inc(c);
p:=False;
end;
readln(f);
if (k>600000) and (c>100000) then break;
end;
if (k=0) Or (c=0) then write(g,0)
else write(g,k div c);
close(f);
close(g);
end.