编程基础-简单模拟实现