Pagini recente » Diferente pentru utilizator/yato2 intre reviziile 31 si 30 | Diferente pentru problema/plangaciosi intre reviziile 20 si 11 | Monitorul de evaluare | Cod sursa (job #2629512) | Cod sursa (job #400921)
Cod sursa(job #400921)
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 eof(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.