Challenge Information

Title : Ways message can be decoded
Difficulty : Hard
Solutions : 17
Maximum Score : 1000
Completed by You: No
Description :

There is a mapping a = 1, b = 2, ... z = 26 given and an encoded message. You have to count the number of ways it can be decoded.

Write a function solve that have the following parameter(s):
1.) a= string

Example
Input:
a = 111
Output:
3

Explanation
The message 111 would give 3, since it could be decoded as aaa, ka, and ak.

Example
Input:
a = 678
Output:
1

Explanation
The message 111 would give 1, since it could be decoded as hij.

Constraints

Judocode