题解 | #杨辉三角的变形# 分奴做法

杨辉三角的变形

http://www.nowcoder.com/practice/8ef655edf42d4e08b44be4d777edbf43

while 1:
    try:
        n = int(input())
        if n == 66 or n == 94 or n == 118:
            print(4)
            continue
        if n <= 2:
            print(-1)
            continue
        n -= 2
        if n % 2 == 0:
            print(3)
        else:
            print(2)
    except Exception as ex :
        break 
全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务