If the number of nodes below is less then the other will be n - dp [ node ]
if ( dp [ x ] < dp [ y ] ) : NEW_LINE INDENT fi = dp [ x ] NEW_LINE sec = n - dp [ x ] NEW_LINE ans . append ( fi * sec ) NEW_LINE DEDENT