Skip to main content
Commonmark migration
Source Link

#Python 2, Sp3000 from fractions import* n=input() k,=P=[1] while n>len(P):k+=1;z=reduce(lambda x,y:x+y,P[~1:]);P+=[z]#*(gcd(z,k)<2) print P[-1]

Python 2, Sp3000

from fractions import* n=input() k,=P=[1] while n>len(P):k+=1;z=reduce(lambda x,y:x+y,P[~1:]);P+=[z]#*(gcd(z,k)<2) print P[-1] 

#Python 2, Sp3000 from fractions import* n=input() k,=P=[1] while n>len(P):k+=1;z=reduce(lambda x,y:x+y,P[~1:]);P+=[z]#*(gcd(z,k)<2) print P[-1]

Python 2, Sp3000

from fractions import* n=input() k,=P=[1] while n>len(P):k+=1;z=reduce(lambda x,y:x+y,P[~1:]);P+=[z]#*(gcd(z,k)<2) print P[-1] 
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

#Python 2, Sp3000Python 2, Sp3000 from fractions import* n=input() k,=P=[1] while n>len(P):k+=1;z=reduce(lambda x,y:x+y,P[~1:]);P+=[z]#*(gcd(z,k)<2) print P[-1]

#Python 2, Sp3000 from fractions import* n=input() k,=P=[1] while n>len(P):k+=1;z=reduce(lambda x,y:x+y,P[~1:]);P+=[z]#*(gcd(z,k)<2) print P[-1]

#Python 2, Sp3000 from fractions import* n=input() k,=P=[1] while n>len(P):k+=1;z=reduce(lambda x,y:x+y,P[~1:]);P+=[z]#*(gcd(z,k)<2) print P[-1]

Source Link
feersum
  • 31.8k
  • 10
  • 66
  • 125

#Python 2, Sp3000 from fractions import* n=input() k,=P=[1] while n>len(P):k+=1;z=reduce(lambda x,y:x+y,P[~1:]);P+=[z]#*(gcd(z,k)<2) print P[-1]