Count of strings that can be formed using a, b and c under given constraints

I think this question is wrong i.e i think my answer is right and the compiler is giving wrong answer.
i tested on gfg for the same question.
question- https://hack.codingblocks.com/app/contests/203/p/1094
solution-https://ide.codingblocks.com/s/124312
gfg link-https://www.geeksforgeeks.org/count-strings-can-formed-using-b-c-given-constraints/