Level 8 - State Machines and Complex Dependencies (Puzzle 5)
Below is a puzzle involving 24 input buffers and their transformed outputs. Each buffer is exactly 64 bytes, shown in hex. Your task: Figure out the logic of the transformation used to go from the INPUT to the OUTPUT. Then, provide a Python function that, given any new 64-byte buffer, will produce the correct transformed output. Here are the 24 input (SRC) buffers in hex (one line per buffer): INPUT #01: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 INPUT #02: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff INPUT #03: 01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 INPUT #04: 02000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 INPUT #05: 80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 INPUT #06: aa000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 INPUT #07: 00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff INPUT #08: f0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff INPUT #09: 0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff INPUT #10: 55ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff INPUT #11: 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f INPUT #12: fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0 INPUT #13: aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55 INPUT #14: 55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa INPUT #15: f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0 INPUT #16: 0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f INPUT #17: 01010101010101010202020202020202040404040404040408080808080808081010101010101010202020202020202040404040404040408080808080808080 INPUT #18: 01010101020202020202020203030303040404040505050508080808090909090101010102020202020202020303030304040404050505050808080809090909 INPUT #19: 0102040810204080010204081020408001020408102040800102040810204080fefdfbf7efdfbf7ffefdfbf7efdfbf7ffefdfbf7efdfbf7ffefdfbf7efdfbf7f INPUT #20: 48656c6c6f2c20576f726c64212048656c6c6f2c20576f726c64212048656c6c6f2c20576f726c64212048656c6c6f2c20576f726c64212048656c6c6f2c2057 INPUT #21: 4c6f72656d20697073756d20646f6c6f722073697420616d65742c20636f6e73656374657475722061646970697363696e6720656c69742c2073656420646f20 INPUT #22: 0101020305080d1522375990e97962db3d18556dc22ff12011314273b528dd05e2e7c9b07929a2cb6d38a5dd825fe140216182e36548adf5a29739d009d9e2bb INPUT #23: 789b34caf54f2e220acd941e71b88d5836866d0d858b63549e94be2cacc67f5b7ef28f2d9903959f63d3d893dce752779c84162917ec8ff1af4a6422d367e18d INPUT #24: c5d71484f8cf9bf4b76f47904730804b9e3225a9f133b5dea168f4e2851f072fcc00fcaa7ca62061717a48e52e29a3fa379a953faa6893e32ec5a27b945e605f And here are the corresponding transformed outputs (DST) in hex: OUTPUT #01: 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 OUTPUT #02: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa OUTPUT #03: 34333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 OUTPUT #04: 35333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 OUTPUT #05: 80333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 OUTPUT #06: aa333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 OUTPUT #07: 33aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa OUTPUT #08: a5aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa OUTPUT #09: 42aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa OUTPUT #10: 55aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa OUTPUT #11: 333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172 OUTPUT #12: aaaba8a9aeafacada2a3a0a1a6a7a4a5babbb8b9bebfbcbdb2b3b0b1b6b7b4b58a8b88898e8f8c8d82838081868784859a9b98999e9f9c9d92939091969794ff OUTPUT #13: aa56ac58ae5ab05cb25eb460b662b864ba66bc68be6ac06cc26ec470c672c874ca76cc78ce7ad07cd27ed480d682d884da86dc88de8ae08ce28ee490e692e894 OUTPUT #14: 55ab57ad59af5bb15db35fb561b763b965bb67bd69bf6bc16dc36fc571c773c975cb77cd79cf7bd17dd37fd581d783d985db87dd89df8be18de38fe591e793e9 OUTPUT #15: a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5 OUTPUT #16: 42424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242 OUTPUT #17: 3434343434343434353535353535353537373737373737373b3b3b3b3b3b3b3b434343434343434353535353535353537071727374757677b8b9babbbcbdbebf OUTPUT #18: 3434343435353535353535353636363637373737383838383b3b3b3b3c3c3c3c3434343435353535353535353636363637373737383838383b3b3b3b3c3c3c3c OUTPUT #19: 3435373b435346873435373b43534e8f3435373b435356973435373b43535e9faba8aea2ba8ae5a6aba8aea2ba8aedaeaba8aea2ba8af5b6aba8aea2ba8afdbe OUTPUT #20: 48666e6f735f535e777b766f545356747c7d815f536c8589847d545364828a8b8f5f537a9397928b5453729098999d5f5388a1a5a0995453809ea6a7ab5f5396 OUTPUT #21: 4c70746871536f777b7e7753707c7a7e8253857c885377847d8d5f537f8c8c9285849688989a9853898d939b95a091989e985398a09eaa5f53ac9f9f53a1ad53 OUTPUT #22: 34343536383b4048556a639bbc86708e704b67809762a45344645c8ed15b8838b7b29cd39d5cc89e956bcf88ae8cb46f5492b4b6997de3a0dad06c853c8cb7fa OUTPUT #23: 789c679fa05461553d989e517dc59b6769977f4099a0796bb6add85fc8939d7a9ea7b160bd36bbc68b868dbe89b280a6ccb5495c4ab9c5a4e7839e5586a4b4cc OUTPUT #24: 90824787ad9aa1a1bf78519b53638e5aae6558bca466cb8bb981a1b7a1523a629933a9cda0cb538899a372b0615cd1af6acbc772de9dc9b66190dcb6d09b9e9e Instructions: - Return just your best possible approximation as a small python function that takes a 64 byte array as input, and returns the 64 byte array as output. - Remember, the transformation is the same for all 24 buffers. - The function will be scored by the number of buffers that are correctly transformed (as shown in the 24 outputs). - And it also will be tested on another set of 24 hidden input buffers not shown in the prompt. - Do not include anything else in your response, no introduction text or explanations. Example Output: def transform(data: bytes) -> bytes: # Transform logic return bytes
Copy Puzzle Prompt
Submit your solution:
def transform(data: bytes) -> bytes: # Your solution here return data
Submit
Leaderboard