Code:p File.open('./10164786.dat') { |f| f.read }.index("\x01")
|
Bored today, came up with a challenge.
Simply find which byte is the odd one out.
Download 10164786.dat @ UppIT
In simple terms, the file is jammed with a heap of bytes with the value of 0 and one which contains the value of 1, can you figure out which one it is? The solution is when 1 occurs.
Code:p File.open('./10164786.dat') { |f| f.read }.index("\x01")
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |