Level 8 - State Machines and Complex Dependencies (Puzzle 2)
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: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa OUTPUT #02: b963b761b55fb35db15baf59ad57ab55b963b761b55fb35db15baf59ad57ab55b963b761b55fb35db15baf59ad57ab55b963b761b55fb35db15baf59ad57ab55 OUTPUT #03: acababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab OUTPUT #04: aaacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacacac OUTPUT #05: 2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa OUTPUT #06: 095f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f OUTPUT #07: aab963b761b55fb35db15baf59ad57ab55b963b761b55fb35db15baf59ad57ab55b963b761b55fb35db15baf59ad57ab55b963b761b55fb35db15baf59ad57ab OUTPUT #08: a564b862b660b45eb25cb05aae58ac56aa64b862b660b45eb25cb05aae58ac56aa64b862b660b45eb25cb05aae58ac56aa64b862b660b45eb25cb05aae58ac56 OUTPUT #09: b4b862b660b45eb25cb05aae58ac56aa64b862b660b45eb25cb05aae58ac56aa64b862b660b45eb25cb05aae58ac56aa64b862b660b45eb25cb05aae58ac56aa OUTPUT #10: 04ae58ac56aa64b862b660b45eb25cb05aae58ac56aa64b862b660b45eb25cb05aae58ac56aa64b862b660b45eb25cb05aae58ac56aa64b862b660b45eb25cb0 OUTPUT #11: aaacabafb8beb1b9a6b0a7a3b4b2adadc2c4c3c7c0c6c9c1beb8bfbbbcbab5b58a8c8b8f989e91998690878394928d8da2a4a3a7a0a6a9a19e989f9b9c9a9595 OUTPUT #12: b961b25caf5bb05ea565ae60ab5fac62c149ba54c743c846bd4db658c357b44a9981927c8f7b907e85858e808b7f8c82a1699a74a763a8669d6d9678a377946a OUTPUT #13: 090f090d070d070b050b05090309030701070105ff050f030d030d010b010bff090f090d070d070b050b05090309030701070105ff050f030d030d010b010bff OUTPUT #14: 040e040e020c020c000a000a0e080e080c060c060a040a040802080206000600040e040e020c020c000a000a0e080e080c060c060a040a040802080206000600 OUTPUT #15: a55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55a OUTPUT #16: b4b3b2b1b0afaeadacabaaa9a8a7a6a5b4b3b2b1b0afaeadacabaaa9a8a7a6a5b4b3b2b1b0afaeadacabaaa9a8a7a6a5b4b3b2b1b0afaeadacabaaa9a8a7a6a5 OUTPUT #17: acadaeafb0b1b2b3b2b4b6a8aaacaeb0baaeb2b6baaeb2b6a2aaa2aaa2aaa2aac2c2c2c2c2c2c2c29292929292929292f2f2f2f2f2f2f2f23232323232323232 OUTPUT #18: acadaeafaeb0b2b4b6a8aaacb0b3b6a9b2b6baaeb4b9beb3aea6aea6b0a9b2abb4b5b6b7b6a8aaacaeb0b2b4b8abaeb1baaeb2b6bcb1b6bba6aea6aea8b1aaa3 OUTPUT #19: acabb5b1c999f939abaab4b0c898f838baa9b3afc797f737b9a8b2aec696f636b55eb066c27cf02f57a85ca4468a24e3b760b268c47ef23159aa5ea6488c16d5 OUTPUT #20: eadccfcbc9868a04cbe0cad69493e3d5c8d4d28f93fdd4d9d3cf8d8cecded1cdcb888c06cde2ccd89695e5d7cac6d49195ffc6dbd5d18f8eeed0d3cfcd8a8e08 OUTPUT #21: f2d0e5d1d699cbe2e4dfd497cfc5d2d0e597d9cceb97d9d2cfe2868accc7c4dcd7d4edd3e6ece799cbd2d0e7c9e2d5c8c7d794ded1c7e68a8ee0dbce8ad2c88d OUTPUT #22: acadacb0bba6a8c590acfbcd44ddd4956c5901466894a47545661b2d2b86895650c16bed2d8614a53c7910962804b41575362cbd3c2108a610d17482a49654f5 OUTPUT #23: dad16861a61f7e7c6e73c1593319dc196534cca9d723ce07d249f47e079a300f3a59da8539b2ce42c9897dd480b30a2c3cdb43854252e56705243a8287d2ba2a OUTPUT #24: 9589bed55ea537ab1ec5f4cc2073e3273ba19d0363a4e082034469c431b6b58c9c5865082e1795d7e8d7f1b47d8717b77139ce7707d1c84e879812d6ca123c10 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