Letters map to digits A=1 … Z=26. Given a digit string s, count how many ways it can be decoded (e.g. "12" → "AB" or "L"). Leading zeros in a group are invalid.
Input: one line, the digit string. Output: the number of decodings (0 if none).
12
2
226
3
2|26, 22|6, 2|2|6.
06
0
Run your code against the sample tests, or Submit to run the full suite.