Angle Equalizer
Time Limit: 1.0 s
Memory Limit: 512.0 MB
Description
A ceiling fan mostly consists of three blades, each positioned at an angle from the reference point. Due to misalignment, the fan is not functioning properly. To fix this issue, the blades must be realigned so that each blade is positioned at the same angle relative to the reference point.
You are given three integers a_1, a_2, and a_3 representing the current angles of the three blades. The sum of these integers is always 360, and each integer is greater than zero. Your task is to determine the minimum total adjustment needed to align all three blades to the same angle.
Format
Input
A single line containing three space-separated integers a_1, a_2, and a_3.
Constraint:
- 0 < a1, a2, a3 < 360,
- a1 + a2 + a3 = 360
Output
The output should contain three space-separated integers representing the changes required in
a_1, a_2 and a_3 so that the fan functions corectly.
Sample
Input | Output |
---|---|
|
|
Information
- ID
- 1130
- Difficulty
- 1
- Category
- (None)
- Tags
- (None)
- # Submissions
- 82
- Accepted
- 67
- Accepted Ratio
- 82%
- Uploaded By
Related
In following contests: