This problem is in Contest(s) below:
Contest 4787:基础B-第12课-课堂练习
Contest 5367:AK张老师入门D班 双重循环 家庭作业