Level 8 - State Machines and Complex Dependencies (Puzzle 3)
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: 00010203040506070001020304050607000102030405060700010203040506070001020304050607000102030405060700010203040506070001020304050607 OUTPUT #02: fffe010203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506 OUTPUT #03: 01010203040506070001020304050607000102030405060700010203040506070001020304050607000102030405060700010203040506070001020304050607 OUTPUT #04: 02010203040506070001020304050607000102030405060700010203040506070001020304050607000102030405060700010203040506070001020304050607 OUTPUT #05: 80010203040506070001020304050607000102030405060700010203040506070001020304050607000102030405060700010203040506070001020304050607 OUTPUT #06: aa010203040506070001020304050607000102030405060700010203040506070001020304050607000102030405060700010203040506070001020304050607 OUTPUT #07: 0000fd0203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506 OUTPUT #08: f000fd0203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506 OUTPUT #09: 0ffe010203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506 OUTPUT #10: 55fe010203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506ff00010203040506 OUTPUT #11: 0002040008000c0008080c08100814081010141018101c1018181c18201824182020242028202c2028282c28302834283030343038303c3038383c3840384438 OUTPUT #12: fffffffffffffffff7f7f7f7f7f7f7f7efefefefefefefefe7e7e7e7e7e7e7e7dfdfdfdfdfdfdfdfd7d7d7d7d7d7d7d7cfcfcfcfcfcfcfcfc7c7c7c7c7c7c7c7 OUTPUT #13: aa56ac56ae50b052aa54ac56ae50b052aa54ac56ae50b052aa54ac56ae50b052aa54ac56ae50b052aa54ac56ae50b052aa54ac56ae50b052aa54ac56ae50b052 OUTPUT #14: 55ab57ad51af53b155ab57ad51af53b155ab57ad51af53b155ab57ad51af53b155ab57ad51af53b155ab57ad51af53b155ab57ad51af53b155ab57ad51af53b1 OUTPUT #15: f0f1f2f3f4f5f6f7f0f1f2f3f4f5f6f7f0f1f2f3f4f5f6f7f0f1f2f3f4f5f6f7f0f1f2f3f4f5f6f7f0f1f2f3f4f5f6f7f0f1f2f3f4f5f6f7f0f1f2f3f4f5f6f7 OUTPUT #16: 0f0e1112131415160f101112131415160f101112131415160f101112131415160f101112131415160f101112131415160f101112131415160f10111213141516 OUTPUT #17: 01000304050607080203000106070405040506070001020308090a0b0c0d0e0f1011121314151617202122232425262740414243444546478081828384858687 OUTPUT #18: 0100030406070405020300010706090a0405060709000b0c08090a0b0d0c0f100102030406070405020300010706090a0405060709000b0c08090a0b0d0c0f10 OUTPUT #19: 0103060b142546870103060b142546870103060b142546870103060b14254687fefef9faf3e4c586fefcf9faf3e4c586fefcf9faf3e4c586fefcf9faf3e4c586 OUTPUT #20: 48666e6f7331265e6f736e6725254e6c6c6d712f245c69756c6523234c6a72736f2d225a6b77726321214a687071753320586d717061272748666e6f7331265e OUTPUT #21: 4c70746669256f7773746f23687472687221756a7025676a65752e23676a6874656476667870782761656b736d7669706e662266706c7a332074676724617527 OUTPUT #22: 01000000010d0b1222365b93ed7c64dc3d19576ec62af72711304070b12ddb02e2e6cbb37d2ca4cc6d39a7de865ae747216080e0614dabf2a2963bd30ddce4bc OUTPUT #23: 789c36cdf94a28290ace962175bd8b5f36876f0e899069539e95bc2fa8c3855c7ef3912e9d089ba663d4da90e0e258709c85142c13e989f6af4b6621d762e794 OUTPUT #24: c5d61687fcd49df3b76e4993433586529e3327aaf538bbd9a169f6e1891a0d36cc01fea978a32668717b4ae8322ca5fd379b973cae6d99e42ec4a47898636666 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