my solution for AtCoder