fork download
  1. f=lambda n,a=0,b=1:n^a and-~f(n,b,a+b)
  2.  
  3. for n in 0, 2, 3, 5, 8, 13, 1836311903:
  4. print('%10u -> %2d' % (n, f(n)))
Success #stdin #stdout 0.02s 9984KB
stdin
Standard input is empty
stdout
         0 ->  0
         2 ->  3
         3 ->  4
         5 ->  5
         8 ->  6
        13 ->  7
1836311903 -> 46