完成编程练习 5.24

Signed-off-by: acgtyrant <acgtyrant@gmail.com>