Functionality:
Implement a Python function that calculates the One-Rep Max (1RM) of a weightlifter based on lifted weight and the number of repetitions performed. The function leverages three different formulas: Epley, McGlothin, and Lombardi, and returns the highest estimate rounded to the nearest whole number.
Input Requirements:
The function should accept two parameters:
w: (float or int) The weight lifted (in pounds or kilograms).
r: (int) The number of repetitions performed.
Output Requirements:
The function should return an integer value representing the estimated 1RM.
If the number of repetitions (r) is zero, the function should return 0.
If r is one, the function should return the weight lifted (w).
File Implementation:
Implement the solution in a file called /app/solution.py with the given function signature:
python
def calculate_1RM(w, r):
# implementation here
Examples:
calculate_1RM(100, 10) should return 133 (based on the highest of the three formulas).
calculate_1RM(200, 0) should return 0.
calculate_1RM(150, 1) should return 150.
Ensure that the implementation is robust and handles various edge cases as described.