Check it is passing only two test case
THE FORMULA IS NC2 i.e selecting pairs
@harry_potter123 are you sure that nC2 can be written as n(n-1)/2 always? where did the factorial go?
yes i am damn sure basically ncr=n!/(n-r)!r! and n!=n(n-1)(n-2.)…(n-r)! so ncr=n(n-1)*(n-2)…(n-r+1)/r!