FLAGS - Editorial

understood my mistake @drpraveen … thanx

hahaha lucky you

1 Like

But in flag 4, no.3 and 4 can have same colors as they are not sharing any side, same case for flag 5, 1 and 4 are not sharing any side they also can share same color.
So there must also be added a case for 3 colors in flag 4 and 5, as n*(n-1)*(n-2)

n should be long long int…if you are taking n as int then typecast it to long long int while evaluating expression…