Add solution for Baekjoon Online Judge - 1004.