Level 3 - Intro to Multi-Byte (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: aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07 OUTPUT #02: 55065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506 OUTPUT #03: ab07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07 OUTPUT #04: a807aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07 OUTPUT #05: 2a07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07 OUTPUT #06: 0007aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07aa07 OUTPUT #07: aa065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506 OUTPUT #08: 5a065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506 OUTPUT #09: a5065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506 OUTPUT #10: ff065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506550655065506 OUTPUT #11: aa08a80aae0cac0ea210a012a614a416ba18b81abe1cbc1eb220b022b624b4268a28882a8e2c8c2e82308032863484369a38983a9e3c9c3e9240904296449446 OUTPUT #12: 55055703510153ff5dfd5ffb59f95bf745f547f341f143ef4ded4feb49e94be775e577e371e173df7ddd7fdb79d97bd765d567d361d163cf6dcd6fcb69c96bc7 OUTPUT #13: 005c005c005c005c005c005c005c005c005c005c005c005c005c005c005c005c005c005c005c005c005c005c005c005c005c005c005c005c005c005c005c005c OUTPUT #14: ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1ffb1 OUTPUT #15: 5af75af75af75af75af75af75af75af75af75af75af75af75af75af75af75af75af75af75af75af75af75af75af75af75af75af75af75af75af75af75af75af7 OUTPUT #16: a516a516a516a516a516a516a516a516a516a516a516a516a516a516a516a516a516a516a516a516a516a516a516a516a516a516a516a516a516a516a516a516 OUTPUT #17: ab08ab08ab08ab08a809a809a809a809ae0bae0bae0bae0ba20fa20fa20fa20fba17ba17ba17ba178a278a278a278a27ea47ea47ea47ea472a872a872a872a87 OUTPUT #18: ab08ab08a809a809a809a809a90aa90aae0bae0baf0caf0ca20fa20fa310a310ab08ab08a809a809a809a809a90aa90aae0bae0baf0caf0ca20fa20fa310a310 OUTPUT #19: ab09ae0fba27ea87ab09ae0fba27ea87ab09ae0fba27ea87ab09ae0fba27ea87540451fe45e61586540451fe45e61586540451fe45e61586540451fe45e61586 OUTPUT #20: e26cc673c5338a5ec579c66b8b27e26cc673c5338a5ec579c66b8b27e26cc673c5338a5ec579c66b8b27e26cc673c5338a5ec579c66b8b27e26cc673c5338a5e OUTPUT #21: e676d86cc727c377d97cc727ce76c676d827d970de27cb74cf7b8627c976c47acf6ade6cde7cd827cb6bc377c37ac970c46e8a6cc670de338a7acf6b8a6bc527 OUTPUT #22: ab08a80aaf0fa71c883ef3974380c8e2971fff7468365b27bb38e87a1f2f770c48ee63b7d33008d2c73f0fe428664b478b6828eacf4f07fc089e93d7a3e048c2 OUTPUT #23: d2a29ed15f568429a0d43e25dbbf275f9c8dc7142f92c95b349b143306cdd562d4f92534330a3fa6c9da729a76eef87e368bbc30bdf325f80551ce29796e4b94 OUTPUT #24: 6fdebe8b52d631fb1d76ed97ed372a5234398fb05b3a1fe50b6f5ee92f26ad36660756b1d6ad8a68db81e2ec843009019da13f46006f39ea84cc08823e65ca66 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