Pagini recente » Cod sursa (job #1696812) | capsuna1 | Cod sursa (job #2338945) | Cod sursa (job #2495539) | Cod sursa (job #281647)
Cod sursa(job #281647)
var lit,cuv:int64;
l:char;
ok:boolean;
f:text;
begin
lit:=0;
cuv:=0;
ok:=false;
assign (f,'text.in');
reset (f);
read(f,l);
while (ord(l)<ord('a')) or (ord(l)>ord('z')) do
read(f,l);
lit:=1;
while not eoln(f) do
begin
read (f,l);
while ((ord(l)<ord('a'))or (ord (l)>ord('z')))and not eof(f) do
begin
read(f,l); ok:=true;
end;
if ok then
begin
inc(cuv);
ok:=false;
end;
inc (lit);
if eof(f) then
dec(lit);
end;
if (ord(l)>=ord('a'))or (ord(l)<=ord('z')) then
inc(cuv);
close (f);
assign (f,'text.out');
rewrite (f);
write (f,lit div cuv);
close (f);
end.