This problem is used in private contest:三级编程题练习