Pagini recente » Cod sursa (job #2613651) | Cod sursa (job #252713) | Cod sursa (job #1747525) | Cod sursa (job #3238843) | Cod sursa (job #2811)
Cod sursa(job #2811)
program text_infoarena;
type sir = array[1..1048577] of char;
var a: sir;
cuv,len,k: integer;
f: text;
begin
len:=0;
cuv:=0;
k:=0;
assign(f,'text.in'); reset(f);
while not eof(f) do begin
read(f,a[i]);
if Upcase(a[i]) in ['A'..'Z','0'..'9'] then begin
inc(len);
if k=0 then inc(cuv);
k:=1;
end
else
k:=0;
end;
assign(f,'text.out'); rewrite(f);
write(f,len div cuv);
Close(f);
end.