Level 1 - Single Byte - Basic (Puzzle 4)
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: 07070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707 OUTPUT #02: 04040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404 OUTPUT #03: 0a070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707 OUTPUT #04: 0d070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707 OUTPUT #05: 87070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707 OUTPUT #06: 05070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707 OUTPUT #07: 07040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404 OUTPUT #08: d7040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404 OUTPUT #09: 34040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404 OUTPUT #10: 06040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404 OUTPUT #11: 070a0d101316191c1f2225282b2e3134373a3d404346494c4f5255585b5e6164676a6d707376797c7f8285888b8e9194979a9da0a3a6a9acafb2b5b8bbbec1c4 OUTPUT #12: 0401fefbf8f5f2efece9e6e3e0dddad7d4d1cecbc8c5c2bfbcb9b6b3b0adaaa7a4a19e9b9895928f8c898683807d7a7774716e6b6865625f5c595653504d4a47 OUTPUT #13: 05060506050605060506050605060506050605060506050605060506050605060506050605060506050605060506050605060506050605060506050605060506 OUTPUT #14: 06050605060506050605060506050605060506050605060506050605060506050605060506050605060506050605060506050605060506050605060506050605 OUTPUT #15: d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7 OUTPUT #16: 34343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434 OUTPUT #17: 0a0a0a0a0a0a0a0a0d0d0d0d0d0d0d0d13131313131313131f1f1f1f1f1f1f1f37373737373737376767676767676767c7c7c7c7c7c7c7c78787878787878787 OUTPUT #18: 0a0a0a0a0d0d0d0d0d0d0d0d1010101013131313161616161f1f1f1f222222220a0a0a0a0d0d0d0d0d0d0d0d1010101013131313161616161f1f1f1f22222222 OUTPUT #19: 0a0d131f3767c7870a0d131f3767c7870a0d131f3767c7870a0d131f3767c78701fef8ecd4a4448401fef8ecd4a4448401fef8ecd4a4448401fef8ecd4a44484 OUTPUT #20: df364b4b548b670c545d4b336a67df364b4b548b670c545d4b336a67df364b4b548b670c545d4b336a67df364b4b548b670c545d4b336a67df364b4b548b670c OUTPUT #21: eb545d364e67425760664e6733544b545d67604263672a4e36638b67305451603630633663665d672a33425742603042513c67364b42638b6760363367335467 OUTPUT #22: 0a0a0d10161f2e466dac12b7c2722d98be4f064e4d94da673a9acd60267f9e16adbc62177282ed684eaff69e8d24aac76a2a8db036df0ee6edccb2772292ad38 OUTPUT #23: 6fd8a365e6f4916d256ec3615a2fae0fa9994e2e96a83003e1c3418b0b59841881ddb48ed210c6e430808fc09bbcfd6cdb9349824ccbb4da14e5336d803caaae OUTPUT #24: 568c4393ef74d8e32c54dcb7dc9787e8e19d7602daa026a1ea3fe3ad96641c946b07fb057bf9672a5a75dfb69182f0f5acd5c6c4053fc0b09156ed78c3212724 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