UVa 11313 - Gourmet Games

Problem Number - Problem Name

 * 11313 - Gourmet Games

Summary
Total n chefs. m chefs will fight with each other and one chef will be selected in each round. Now you have to calculate how many tournament needed to select a chef for the restaurant.

Explanation
Just calculate (n-1)/(m-1). If (n-1) will not divisible by (m-1) then cannot do this

Input
8 10 4 11 4 19 2 100 10 999 32 345 234 10000 12 8 2

Output
3 cannot do this 18 11 cannot do this cannot do this 909 7