Bracket Rounds

Medium · rating 1200 · Math

A single-elimination tournament halves the field each round. Read n players and print the number of rounds needed to crown one winner (0 if there is a single player).

Constraints: 1 ≤ n ≤ 109

Related problems

Open Bracket Rounds in Code Arena →