Cod sursa(job #108988)
Utilizator | Jecan Daniel Valerian jdv | Data | 24 noiembrie 2007 12:43:55 |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.65 kb |
{ preONI runda 1 }
{ text }
var s:char;
cuv,lit,k,i:integer;
f:text;
m:set of 'A'..'Z';
begin
for i:=65 to 90 do m:=m+[chr(i)];
assign(f,'text.in'); reset(f);
k:=0; lit:=0; cuv:=0;
while not eof(f) do
begin
read(f,s);
if [upcase(s)]*m=[upcase(s)] then
begin
inc(lit);
if k=0 then begin
inc(cuv);
k:=-1;
end;
end
else k:=0;
end;
close(f);
assign(f,'text.out'); rewrite(f);
writeln(f,lit div cuv);
close(f);
end.