题解 | 小红的二叉树

小红的二叉树

https://www.nowcoder.com/practice/ee287e0f6af64edd969f01444dd763e4

# import math
n=int(input())
if n==1:
    print(0)
else:
    # nl=int(math.pow(2,n-1)-1)
    print((3*(2**(n-1)-1)-2)%((10**9)+7))

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

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