Algorithm ( p & swlug )/Baekjoon(47)