Answer:
45
Step-by-step explanation:
Let's do it for smaller numbers first.
0 people -> 0 high fives
1 people -> 0 high fives
2 people -> 1 high fives
3 people -> person 1 high fives 2 then 3
And person 2 high fives 3
->2+1= 3 high fives
4 people -> person 1 high fives 2,3, then 4
And person 2 high fives 3 then 4
And 3 high fives 4
->3+2+1=6
5 people -> person 1 high fives 2,3,4, then 5
And person 2 high fives 3,4, 5
And 3 high fives 4,5
And 4 high fives 5
-> 4+3+2+1=10
So for n people there would be (n-1)+(n-2)+....+3+2+1 high fives or (n-1)n/2 people.
Test:
3 people -> (3-1)3/2=(2)3/2=3
4 people -> (4-1)4/2=(3)4/2=6
5 people -> (5-1)5/2=(4)5/2=10
10 people-> (10-1)10/2=(9)10/2=90/2=45
or you could do 9+8+7+6+5+4+3+2+1 which also gives 45.