word of lowercase English letters is cut into consecutive blocks of exactly size characters each (the length of word is a multiple of size).
Every letter has a weight equal to its zero-based position in the alphabet: a weighs 0, b weighs 1, …, z weighs 25. Each block is squeezed into a single letter: add up the weights of its letters, take the sum modulo 26 and turn that number back into a letter by the same rule.
Return the string made of the digests of all blocks, in the order the blocks appear in word.word="bcadzz", size=2 → 'ddy'
Blocks: "bc" → 1 + 2 = 3 → d; "ad" → 0 + 3 = 3 → d; "zz" → 25 + 25 = 50, 50 mod 26 = 24 → y.
word="code", size=4 → 'x'
A single block: 2 + 14 + 3 + 4 = 23 → x.
word="kiwi", size=1 → 'kiwi'
word consists of lowercase English letters onlyword="bcadzz", size=2
'ddy'
Run checks the first 3 tests in your browser. Submit checks all 41 tests on the server, hidden ones included.