Implement a Python function that calculates the one-repetition maximum (1RM) based on the weight lifted and the number of repetitions performed. The function will take into account various formulas to estimate the 1RM and return the highest estimated value.
Input/Output Requirements
Input Parameters:
w (float): The weight (in pounds or kilograms) lifted during the exercise. This value should be a non-negative number.
r (integer): The number of repetitions performed with the weight w. This value must be a non-negative integer.
Output:
The function should return an integer representing the estimated one-repetition maximum (1RM). If r is zero, the function should return 0. If r is one, the function should return the exact weight w lifted.
Implementation
Create a file named /app/solution.py.
Define the calculate_1RM function in this file with the specified signature.
Ensure that the implementation uses the formulas for Epley, McGlothin, and Lombardi to compute the 1RM and returns the maximum value rounded to the nearest integer.
Example
For the input calculate_1RM(100, 10), the output should be an integer representing the estimated 1RM based on the calculations performed by the function.