/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 1ms 532.0 KiB
#3 Accepted 1ms 336.0 KiB
#4 Accepted 1ms 340.0 KiB
#5 Accepted 1ms 532.0 KiB
#6 Accepted 1ms 444.0 KiB
#7 Accepted 1ms 448.0 KiB
#8 Accepted 1ms 532.0 KiB
#9 Accepted 2ms 532.0 KiB
#10 Accepted 3ms 532.0 KiB
#11 Accepted 3ms 532.0 KiB
#12 Accepted 3ms 532.0 KiB
#13 Accepted 3ms 532.0 KiB

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