1002, time limit exceeded...
add test case for 1002