Level 3 - Intro to Multi-Byte (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: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 OUTPUT #02: fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0 OUTPUT #03: 01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101 OUTPUT #04: 02020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202 OUTPUT #05: 80808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080 OUTPUT #06: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa OUTPUT #07: 00fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1 OUTPUT #08: f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0bfbebdbcbbbab9b8b7b6b5b4b3b2b1 OUTPUT #09: 0f0e0d0c0b0a09080706050403020100fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0 OUTPUT #10: 5554535251504f4e4d4c4b4a494847464544434241403f3e3d3c3b3a393837363534333231302f2e2d2c2b2a292827262524232221201f1e1d1c1b1a19181716 OUTPUT #11: 000103060a0f151c242d37424e5b69788899abbed2e7fd142c455f7a96b3d1f0103153769abfe50c345d87b2de0b396898c9fb2e6297cd043c75afea2663a1e0 OUTPUT #12: fffdfaf6f1ebe4dcd3c9beb2a59788786755422e1903ecd4bba1866a4d2f10f0cfad8a66411bf4cca3794e22f5c798683705d29e6933fcc48b5116da9d5f20e0 OUTPUT #13: aaffa9fea8fda7fca6fba5faa4f9a3f8a2f7a1f6a0f59ff49ef39df29cf19bf09aef99ee98ed97ec96eb95ea94e993e892e791e690e58fe48ee38de28ce18be0 OUTPUT #14: 55ff54fe53fd52fc51fb50fa4ff94ef84df74cf64bf54af449f348f247f146f045ef44ee43ed42ec41eb40ea3fe93ee83de73ce63be53ae439e338e237e136e0 OUTPUT #15: f0e0d0c0b0a090807060504030201000f0e0d0c0b0a090807060504030201000f0e0d0c0b0a090807060504030201000f0e0d0c0b0a090807060504030201000 OUTPUT #16: 0f1e2d3c4b5a69788796a5b4c3d2e1f0ff0e1d2c3b4a5968778695a4b3c2d1e0effe0d1c2b3a495867768594a3b2c1d0dfeefd0c1b2a39485766758493a2b1c0 OUTPUT #17: 01020304050607080a0c0e10121416181c2024282c30343840485058606870788898a8b8c8d8e8f81838587898b8d8f83878b8f83878b8f878f878f878f878f8 OUTPUT #18: 0102030406080a0c0e101214171a1d2024282c30353a3f444c545c646d767f88898a8b8c8e90929496989a9c9fa2a5a8acb0b4b8bdc2c7ccd4dce4ecf5fe0710 OUTPUT #19: 0103070f1f3f7fff0002060e1e3e7efeff01050d1d3d7dfdfe00040c1c3c7cfcfaf7f2e9d8b776f5f3f0ebe2d1b06feeece9e4dbcaa968e7e5e2ddd4c3a261e0 OUTPUT #20: 48ad1985f42040970678e4486989d136a20e7da9c9208f016dd1f2125abf2b97063252a9188af65a7b9be348b4208fbbdb32a1137fe304246cd13da9184464bb OUTPUT #21: 4cbb2d92ff1f88f86be04d6dd140ac1b8dad2089fd1d7eeb50c4f01073e250c3288bff64d84dbfdf40a40d7de659bc2593fa1a7feb54c8f41487ec5070d44363 OUTPUT #22: 010204070c142136588fe87861da3c17546cc12ef01f10304172b427dc04e1e6c8af7828a1ca6c37a4dc815ee03f206081e26447acf4a19638cf08d8e1ba9c57 OUTPUT #23: 78134711065583a5af7c102e9f57e43c72f86572f782e539d76b295501c746a11f11a0cd6669fe9d00d3ab3e1a0153ca66ea0029402cbbac5ba5092bfe6546d3 OUTPUT #24: c59cb0342cfb968a41b0f787cefe7ec96799be67588b401ebf271bfd82a1a8d7a3a39f49c56b8bec5dd71f04325bfef82fc95e9d47af42255318ba35c92787e6 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