This problem is in Contest(s) below:
Contest 1096:Java上机练习 软件工程24 #2