#C (gcc), (削除) 91 (削除ここまで) bytes
j;m;t;f(x){for(j=m=0;t=x>>j+8;m<t?m=t:j++)t=t<<j|x%(1<<j);return m;}
-23 bytes from Colera Su
Supports up to 2**31-1
Starts with the low 8 bits (j=0), then goes up, changing output if the number with bits [j,j+8) cut out is bigger than our current, and continuing until x has no bits above j+8
pizzapants184
- 3.6k
- 16
- 18