Sky飞羽

关注

P1255 数楼梯 方法一(python3实现)

Sky飞羽

关注

阅读 94

2022-01-27

https://www.luogu.com.cn/problem/P1255


"""
P1255 数楼梯 方法一
https://www.luogu.com.cn/problem/P1255

"""
a=[0 for i in range(5010)]

a[1]=1
a[2]=2

n=int(input())

for i in range(3,n+1):
    a[i]=a[i-1]+a[i-2]
    
print(a[n])


相关推荐

艾晓雪

洛谷:P1255数楼梯

艾晓雪 136 0 0

林肯公园_97cc

(未AC)洛谷 P1255 数楼梯

林肯公园_97cc 70 0 0

凶猛的小白兔

P1161 开灯(python3实现)

凶猛的小白兔 96 0 0

Brose

P5710 【深基3.例2】数的性质(python3实现)

Brose 77 0 0

西特张

P5705 【深基2.例7】数字反转(python3实现)方法一

西特张 32 0 0

雨鸣静声

P1100 高低位交换(python3实现)

雨鸣静声 70 0 0

汤姆torn

P1028 [NOIP2001 普及组] 数的计算(python3、scratch实现)

汤姆torn 62 0 0

陈情雅雅

P1423 小玉在游泳(python3实现)

陈情雅雅 109 0 0

律楷粑粑

python3 重启docker方法

律楷粑粑 35 0 0

就是耍帅

P1880 [NOI1995] 石子合并(python3实现)

就是耍帅 73 0 0

精彩评论(0)

0 0 举报