Level 8 - State Machines and Complex Dependencies (Puzzle 1)
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: 35e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e0 OUTPUT #03: 56555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555 OUTPUT #04: 02000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 OUTPUT #05: 90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 OUTPUT #06: bf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 OUTPUT #07: 0035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035 OUTPUT #08: ee35e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035 OUTPUT #09: 63e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e0 OUTPUT #10: b4e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e035e0 OUTPUT #11: 00565703045a5b07095d600a0d61640e12686511166c69151b6f6e181f73721c247a7b27207677232d81842e297d802a368c8935328885313f93923c3b8f8e38 OUTPUT #12: 3536e2e3393ae6e73e3debea4241efee4748f0f14b4cf4f5504ff9f85453fdfc191ac6c71516c2c32221cfce1e1dcbca2b2cd4d52728d0d13433dddc302fd9d8 OUTPUT #13: bfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145f OUTPUT #14: b4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbfb4145fbf OUTPUT #15: eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee OUTPUT #16: 630e630e630e630e630e630e630e630e630e630e630e630e630e630e630e630e630e630e630e630e630e630e630e630e630e630e630e630e630e630e630e630e OUTPUT #17: 56015601560156010202020202020202040404040404040409090909090909091212121212121212242424242424242448484848484848489090909090909090 OUTPUT #18: 56015601020202020202020258035803040404045a055a05090909095d085d0856015601020202020202020258035803040404045a055a05090909095d085d08 OUTPUT #19: 5657595e67799de501020409122448905657595e67799de50102040912244890e137e43ef219a8c536e239e947c4fd70e137e43ef219a8c536e239e947c4fd70 OUTPUT #20: 41beb6b6622924b2627c61687a7996696161b77e795db7d1b6bd252441beb6b6622924b2627c61687a7996696161b77e795db7d1b6bd252441beb6b6622924b2 OUTPUT #21: 45b7d169b579647ed27bb579bd6261b7d1797db9cf796db5697a2924c46263d269c4cf697ad0d1796d68b9d364d26fb9b86b24beb6647a2924d269682468b779 OUTPUT #22: 56010258050961172686528249766e153a1bb460da7fef2468374ad2a32d1b05fe50d0a6cb2cb627603f06c692a9fd487a6d925469410debb6da3eca5dc2fe01 OUTPUT #23: 77dd8728eb9b807b60d4861dd4049c533096b50cea9ac4b3e2dbfe7e0e3370a5c6419e7d8a5887e16f1e1881c750ad798f94148115f1f3ef0f98bd7bc9c0fdf1 OUTPUT #24: 32cd1694e72b88eaf662a4d74f369097e2892111ef8aa3c50aba3f539571077f2a553814c807796dd4ca96f92b81b7e586de878d14ba815480ddb6c9dbaac154 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