Slow implementation (over 1 hour)
Merge pull request #17 from Meng-Gen/problem-485

Slow implementation (1 ~ 2 hours)