Indeed: to reward quality over quantity you'd need to use a function such as x^2, or probably x^2/C for some constant C.
Interestingly, Oxford University used to mark final exams for Mathematics and associated schools (such as Computer Science) in this way. Questions would typically start with parts that were largely "book work" and move on to parts that required more careful thought. In addition, you could answer as many questions as you like. Therefore, to avoid people getting lots of marks by just answering all the book work, the papers were scored by squaring the scores for each question and then summing those squares.
That is: overall_score = sum(q in Questions | score(q)^2)
This practice stopped in ~2003 (now you can still answer as many as you like, but the mark for the paper is the sum of your top 3 marks for individual questions, so it's only really worth answering 3 as well as you can).
Interestingly, Oxford University used to mark final exams for Mathematics and associated schools (such as Computer Science) in this way. Questions would typically start with parts that were largely "book work" and move on to parts that required more careful thought. In addition, you could answer as many questions as you like. Therefore, to avoid people getting lots of marks by just answering all the book work, the papers were scored by squaring the scores for each question and then summing those squares.
That is: overall_score = sum(q in Questions | score(q)^2)
This practice stopped in ~2003 (now you can still answer as many as you like, but the mark for the paper is the sum of your top 3 marks for individual questions, so it's only really worth answering 3 as well as you can).