Adding faster algorithm, start from 1000, break when find the first one
A little tweak on q3/Main_2.java