Quantitative Programming by Examples