3 ms·
If this was reddit, you would get gold for that reply
by nodejsguy 12y ago
If this was reddit, you would get gold for that reply
- gamegoblin 12y agoIn the time it took me to do it by hand I am 100% positive I could have written a Python program to do it probably 3 times. Yyyyep just tested it: def fibs(n, tabs=0): if n < 2: print "\t"*tabs + "1" return 1 print "\t"*tabs+"fibs %d"%n a = fibs(n-1, tabs+1) b = fibs(n-2, tabs+1) print "\t"*tabs+str(a+b) return a+b Took exactly 71 seconds to write. I probably spent 3 minutes on it by hand getting all the spaces right.