Check it is passing only two test case

@harry_potter123 what formula are you using to calculate the final answer?

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!

@harry_potter123 i am not getting output for the input
2
5
1 1 1 1 1
5
5 5 5 5 5