Cod sursa(job #400919)
Utilizator | Data | 22 februarie 2010 10:21:11 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.4 kb |
const m:set of char=['a'..'z','A'..'Z'];
var nrl,nrc:int64;
f:text;
c,x:char;
begin
assign(f,'text.in');reset(f);
nrl:=0;
nrc:=0;
x:='-';
while not eoln(f) do begin
read(f,c);
if c in m then inc(nrl)
else if x in m then inc(nrc);
x:=c;
end;
close(f);
assign(f,'text.out');rewrite(f);
write(f,trunc(nrl/nrc));
close(f)
end.