Pagini recente » Cod sursa (job #1749680) | Cod sursa (job #343746) | Cod sursa (job #956976) | Clasament simulare_oni_2021_12 | Cod sursa (job #486561)
Cod sursa(job #486561)
var f:text;
c,x:char;
db,szo:longint;
begin
assign(f,'text.in');
reset(f);
db:=0; szo:=0;
read(f,x);
if x in ['a'..'z','A'..'Z'] then begin inc(db); inc(szo) end;
while not eoln(f) do begin
read(f,c);
if c in ['a'..'z','A'..'Z'] then inc(db)
else if x in ['a'..'z','A'..'Z'] then inc(szo);
x:=c;
end;
close(f);
assign(f,'text.out');
rewrite(f);
write(f,db div szo);
close(f);
end.