solved problem 425
solved problem 202 but is too slow