This problem is in Contest(s) below:
Contest 1156:课堂测试
Contest 1171:入门测试1