Updated MAX_K to 500 and added additional input cases. Also implemented improved timing output.