This problem is in Contest(s) below:
Contest 1065:2021년도 2학기 자바프로그래밍 과제 08
Contest 1090:2022년도 2학기 자바프로그래밍 과제 07
Contest 1095:2023년도 1학기 C++프로그래밍 과제 3
Contest 1076:2022년도 1학기 C++ 프로그래밍 4장 문제