题解 | #递归画图#

递归画图

http://www.nowcoder.com/practice/d01d668861f84471872ff0e9c958cae2

def paint(a,b,c):
    print(" "*a+"#"*b)
    if c<4:
        return paint(a-1,b+2,c+1) 
    elif c>=4 and c<8:
        return paint(a+1,b-2,c+1)
paint(4,1,1)
全部评论

相关推荐

龙珠传说:nb,公务员解约不需要支付违约金吧
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务