Accepted
Code
#include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main() {
// your code goes here
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll t=1;
// cin>>t;
while(t--){
ll a,b,c;
cin>>a>>b>>c;
ll ans1=120-a, ans2=120-b, ans3=120-c;
if(ans1>180){
ans1-=360;
}
if(ans1<-180){
ans1+=360;
}
if(ans2>180){
ans2-=360;
}
if(ans2<-180){
ans2+=360;
}
if(ans3>180){
ans3-=360;
}
if(ans3<-180){
ans3+=360;
}
cout<<ans1<<" "<<ans2<<" "<<ans3<<endl;
}
}
Information
- Submit By
- Type
- Submission
- Problem
- P1130 Angle Equalizer
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-01-02 17:47:07
- Judged At
- 2025-01-02 17:47:07
- Judged By
- Score
- 100
- Total Time
- 3ms
- Peak Memory
- 532.0 KiB