Link:
https://www.nowcoder.com/acm/contest/104/A
Source: Niuke.com
Source: Niuke.com
answer:
Draw auxiliary lines to construct an equilateral triangle, and then you can prove that triangle 1 and triangle 2 in the figure are congruent (edge, corner, edge, I didn't expect that in junior high school mathematics)
Obviously, the orange triangle is the triangle we require, so an angle can be calculated as minus 60°, and the same is true for the other two angles;
Attach the ac code:
#include<stdio.h> #include<algorithm> using namespace std; intmain() { double s[3]; double a,b,c; while(scanf("%lf%lf%lf",&a,&b,&c)!=EOF) { s[0]=a-60; s[1]=b-60; s[2]=c-60; sort(s,s+3); printf("%lf %lf %lf\n",s[0],s[1],s[2]); } return 0; }