This problem is in Contest(s) below:
Contest 1177:GESP三级考试编程第二题汇总