This problem is in Contest(s) below:
Contest 1213:武进区第8届小学生程序设计竞赛
Contest 1633:WJOI2015
Contest 1624:2018秋季C++高级课堂练习2
Contest 1411:cz初级班第13课作业
Contest 1466:寒假玩编码