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