Cod sursa(job #1038892)

Utilizator DjokValeriu Motroi Djok Data 22 noiembrie 2013 07:57:56
Problema Text Scor 30
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.56 kb
var s:string;
    i, l, c:longint;
begin
assign(input,'text.in');
assign(output,'text.out');
reset(input);
rewrite(output);
 readln(s); l:=0; c:=0;
  for i:=1 to length(s) do
   case s[i] of
    'a'..'z': inc(l);
    'A'..'Z': inc(l);
   end; i:=1;
   while i<>length(s) do
    begin
     if ((ord(s[i])>=65) and (ord(s[i])<=90)) or ((ord(s[i])>=97) and (ord(s[i])<=122)) or (ord(s[i])=45)
       then inc(i)
       else begin
             inc(i);
             inc(c);
            end;
    end;
    writeln(l div c);
close(input);
close(output);
end.