#C6105. Tournament Rounds Calculator
Tournament Rounds Calculator
Tournament Rounds Calculator
You are given the number of teams participating in a single-elimination tournament. In a tournament where teams compete in knockout rounds until a winner is determined, the number of rounds required is given by the formula \( \log_2(n) \), where \( n \) is the number of teams. Note that if there is only one team, no rounds are needed.
Your task is to determine both the minimum and maximum number of rounds required. Since the tournament is perfectly balanced (the number of teams is always a power of two), the minimum and maximum rounds are the same.
Input Format: A single integer \( n \) representing the number of teams.
Output Format: Two integers representing the minimum and maximum rounds required (separated by a space).
inputFormat
The input consists of a single integer \( n \) (from standard input), which is a power of two, representing the number of teams in the tournament.
outputFormat
Output two integers separated by a space: the minimum and maximum number of rounds required to determine the tournament winner. Use the formula \( \log_2(n) \), with the exception that if \( n = 1 \), output is \( 0 0 \).
## sample1
0 0