Solve 3255 first version, get a time limit exceed