AC

copy the problem from leetcode to my code from now on