This problem is in Contest(s) below:
Contest 1159:初一小朋友C++入门
Contest 1172:2018小六C++入门