Python 3大法好!

P1255 数楼梯

super蒟蒻 @ 2018-10-28 11:42:36

i=int(input());
a=1;
b=1;
c=1;
x=3;
mod=1000000009;
while x<=i+1:
    c=a+b;
    a=b;
    b=c;
    x=x+1;
if i==0:
    print(0);
else:
    print(c);

by Fraction @ 2018-10-28 11:56:11


by yzhang @ 2018-10-28 11:56:25

下一个


by lyclyc_NSP @ 2018-10-28 11:57:31

@lbyoi 惊现lby大佬!您会py?


|