modify Q116/main.c to optimize the efficiency and process duplicated code