Cod sursa(job #5178)
Utilizator | Data | 10 ianuarie 2007 20:43:12 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.5 kb |
Program cel;
var f,g:text;
c:char;
cuv,nr,x:longint;
Begin
Assign(f,'text.in');Reset(f);
Assign(g,'text.out');Rewrite(g);
cuv:=0;
nr:=0;
While not eoln(f) do
Begin
Read(f,c);
x:=nr;
While not (upcase(c) in ['A'..'Z']) and (not eoln(f)) do Read(f,c);
While (upcase(c) in ['A'..'Z']) and (not eoln(f)) do
Begin
inc(nr);
Read(f,c);
end;
If upcase(c) in ['A'..'Z'] then inc(nr);
If x<>nr then inc(cuv);
end;
Write(g,nr div cuv);
Close(f);
Close(g);
end.