two problems:
http://leetcode.com/onlinejudge#question_4
http://leetcode.com/onlinejudge#question_1