Count of distinct permutations of length N having no similar adjacent characters | Function to print the number of permutations possible ; Driver Code
def countofPermutations ( N ) : NEW_LINE INDENT return int ( ( 3 * pow ( 2 , N - 1 ) ) ) ; NEW_LINE DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT N = 5 ; NEW_LINE print ( countofPermutations ( N ) ) ; NEW_LINE DEDENT