Seating arrangement of N boys sitting around a round table such that two particular boys sit together | Function to return the total count of ways ; Find ( n - 1 ) factorial ; Return ( n - 1 ) ! * 2 ! ; Driver code
def Total_Ways ( n ) : NEW_LINE INDENT fac = 1 ; NEW_LINE for i in range ( 2 , n ) : NEW_LINE INDENT fac = fac * i ; NEW_LINE DEDENT return ( fac * 2 ) ; NEW_LINE DEDENT if __name__ == " _ _ main _ _ " : NEW_LINE INDENT n = 5 ; NEW_LINE print ( Total_Ways ( n ) ) ; NEW_LINE DEDENT