New answers tagged

0

JVM Byte Code, 79 bytes The byte count given is for a complete class file that defines a class Code containing single static method Code which implement Fibonacci. A hex dump of the file is given below. 0000000: cafe babe 0003 002d 0004 0100 0428 4929 .......-.....(I) 0000010: 4901 0004 436f 6465 0700 0200 2000 0300 I...Code.... ... 0000020: 0000 0000 ...


1

Python 3, 207 bytes def s(n): p=1 while n>=2*p: p*=2 return n if n<=p else s(n+p//2)if n>=3*p/2 else s(m)if (m:=s(n-p)+p)!= n else n a=lambda n,m:(b:=n&m)>-1 and s(a(a(a(s((n|m)-b%4),b//4*2),b//4),b%4*2+b%4//2))if m else n Try it Online! (Verify all test cases) Explanation This program directly manipulates the binary translations of ...


1

Taktentus, 87 bytes a:=1 @wy_n:=a @wy:=32 b:=1 n:=44 @>=n _:=@stop @wy_n:=a @wy:=32 c:=a a+=b b:=c n-- _-=8 n are variable how many times we count (n-1 because first are writing directly)


0

tq, 6 bytes Currently this has no separator... 01p+r) Explanation 0, # Initialize the number 0 1, # (Since a preceding 0 in decimal is disallowed) p+r, # Initialize the third item in the list as the # previous item + the previous-previous item ) # Extend this forever


Top 50 recent answers are included