SPOJ ACODE

394. Alphacode

 * http://www.spoj.pl/problems/ACODE/

Also seen at:
 * http://acm.csie.ntu.edu.tw/ntujudge/problem.php?id=105
 * http://acm.tju.edu.cn/toj/showp1541.html
 * http://acm.zju.edu.cn/show_problem.php?pid=2202
 * http://acm.pku.edu.cn/JudgeOnline/problem?id=2033

Source: East Central North America 2004

Summary

 * Determine the number of possible combinations given an input string.
 * Requires dynamic programming.
 * The result seems Related to the Fibonacci numbers.

Gotchas
The result is a 64-bit integer - make sure intermediate calculations use that data type.