Cod sursa(job #2812)
Utilizator | Data | 19 decembrie 2006 07:25:25 | |
---|---|---|---|
Problema | Text | Scor | 90 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.49 kb |
program text_infoarena;
type sir = array[1..1048577] of char;
var a: sir;
i,n: longint;
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.