atcoder#ARC094A. [ABC093C] Same Integers
[ABC093C] Same Integers
Score : points
Problem Statement
You are given three integers , and . Find the minimum number of operations required to make , and all equal by repeatedly performing the following two kinds of operations in any order:
- Choose two among , and , then increase both by .
- Choose one among , and , then increase it by .
It can be proved that we can always make , and all equal by repeatedly performing these operations.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the minimum number of operations required to make , and all equal.
2 5 4
2
We can make , and all equal by the following operations:
- Increase and by . Now, , , are , , , respectively.
- Increase by . Now, , , are , , , respectively.
2 6 3
5
31 41 5
23