Inevitably a large number of candidates failed the exams, often repeatedly. During the Tang period, the ratio of success to failure in the palace exam was 1:100 or 2:100. In the Song dynasty, the ratio of success to failure for the metropolitan exam was about 1:50. In the Ming and Qing dynasties, success to failure for the provincial exam was about 1:100. For every shengyuan in the country, only one in three thousand would ever become a jinshi. While most candidates were men of certain means, those from poor families risked everything on passing the exams. Ambitious and talented candidates who suffered repeated failures felt the bite of indignation, and failure escalated from disappointment to desperation, and sometimes even revolt.