Cod sursa(job #278116)

Utilizator anthraxztAndrei Tatar anthraxzt Data 12 martie 2009 09:21:08
Problema Text Scor 30
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.35 kb
program kext;
var s:ansistring;
    c,l,i:longword;
    f:text;
begin
 assign(f,'text.in');reset(f);
 readln(f,s);
 close(f);
 while s<>'' do
  begin
   i:=1;
   while s[i] in ['a'..'z','A'..'Z'] do inc(i);
   if i<>1 then begin inc(c);inc(l,i-1); end;
   delete(s,1,i);
  end;
 assign(f,'text.out');rewrite(f);
 write(f,l div c);
 close(f)
end.