Accepted
Code
#include <stdio.h>
void alignBlades(int a1, int a2, int a3) {
int targetAngle = (a1 + a2 + a3) / 3;
int pos1 = targetAngle - a1;
int pos2 = targetAngle - a2;
int pos3 = targetAngle - a3;
printf("%d %d %d\n", pos1, pos2, pos3);
}
int main() {
int a1, a2, a3;
scanf("%d %d %d", &a1, &a2, &a3);
if (a1 + a2 + a3 != 360) {
printf("Angles do not sum to 360. Please check the input.\n");
return 1;
}
alignBlades(a1, a2, a3);
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1130 Angle Equalizer
- Contest
- Happy New Year 2025
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2025-01-02 14:42:14
- Judged At
- 2025-01-02 14:42:14
- Judged By
- Score
- 100
- Total Time
- 0ms
- Peak Memory
- 356.0 KiB