This problem is in Contest(s) below:
Contest 6403:入门-第15课-课堂练习(童)
Contest 6412:cs-补课练习