Cod sursa(job #754720)

Utilizator RusuAlexeiRusu Alexei RusuAlexei Data 2 iunie 2012 23:18:43
Problema Text Scor 100
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.5 kb
program tex;
  var c:char;
      f:text;

      k,n:longint;
begin
  assign(f,'text.in');
  reset(f);
   k:=0;
  n:=0;
  while not eof(f) do
    begin
      read(f,c);
      if c in ['a'..'z','A'..'Z'] then
        begin
          inc(k);
          while c in  ['a'..'z','A'..'Z']  do
            begin
              inc(n);
              read(f,c);
            end;
        end;
    end;
  close(f);
  assign(f,'text.out');
  rewrite(f);

  writeln(f,n div k);
  close(f);
end.