This problem is in Contest(s) below:
Contest 1008:技能大赛训练02
Contest 1009:16计应2 C程序设计 作业