Pagini recente » Cod sursa (job #1838483) | Cod sursa (job #2954494) | Cod sursa (job #3291271) | Cod sursa (job #1280427) | Cod sursa (job #335255)
Cod sursa(job #335255)
var a:char;
t:text;
k:boolean;
lung,cuv:int64;
function adevarat(c:char):boolean;
begin
adevarat:=((ord(c)>64)and(ord(c)<91))or((ord(c)>96)and(ord(c)<123));
end;
begin
assign(t,'text.in'); reset(t);
read(t,a);
lung:=0;
cuv:=0;
k:=false;
if adevarat(a) then inc(lung);
while not(eof(t)) do begin
while not(eoln(t)) do begin
read(t,a);
if adevarat(a) then begin
inc(lung);
if k=false then inc(cuv);
k:=true;
end else k:=false;
end;
readln(t);
end;
close(t);
assign(t,'text.out'); rewrite(t);
writeln(t,trunc(lung/cuv));
close(t);
end.