my FATCHEF logic is correct according to me.. please can u find out what i am missing as i am getting WRONG ANSWER?

My logic is that i am multiplying the difference between two consecutive plank positions with different colors

nope thts the wrong way! u need to think more. Number of different fence colirings is asked. Different!

you mean AAAABA is same as ABAAAA? @pranjalranjan