[Community Puzzle] Grandma's Serial Keys - Puzzle discussion

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @TwistedByte,validated by @User123,@TelePario and @TBali.
If you have any issues, feel free to ping them.

There is a condition that isn’t being tested in the test cases, and is undefined in the statement.

What happens if the username is 1000 characters long and starts and ends with ‘z’ (ascii 122)?

(122 + 122) * 1000 = 244000 = 0x3B920

Does segment #3 get truncated? to 0xB920? …0x3B92?

Do we take 0x3B920 % 0x10000 as in Segment #4?

You’re right, the puzzle doesn’t say. Seems to be an oversight.

You may assume that result of the segment 3 operation will always be smaller than 16^4 = 65536.