Cod sursa(job #128911)
Utilizator | Morie Daniel Alexandru andum | Data | 28 ianuarie 2008 11:18:24 |
---|---|---|---|
Problema | Text | Scor | 80 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.7 kb |
var k,c:integer;
m:set of 'a'..'z';
n:set of 'A'..'Z';
f,g:text;
p:boolean;
ch:char;
begin
assign(f,'text.in');
assign(g,'text.out');
reset(f);
rewrite(g);
c:=0;
k:=0;
m:=['a'..'z'];
n:=['A'..'Z'];
p:=false;
while not eof(f) do
begin
read(f,ch);
if ch in m+n then begin
inc(k);
p:=false;
end
else if (k>0) and (not p) then begin
inc(c);
p:=true;
end;
end;
write(g,k div c);
close(f);
close(g);
end.