The solution for the homework of mit6.824