2 solutions

  • 1
    @ 2026-10-11 14:08:11
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        long long N,a,b,c;
        cin>>N;
        for(int i=1;i<=N;i++){
            cin>>a>>b>>c;
            if(a==1){
                cout<<b+c<<endl;
            }
            if(a==2){
                cout<<b-c<<endl;
            }
            if(a==3){
                cout<<b*c<<endl;
            }
            if(a==4){
                cout<<b/c;
            }
        }
    return 0;
    }
    

    Information

    ID
    3476
    Time
    1000ms
    Memory
    64MiB
    Difficulty
    1
    Tags
    # Submissions
    69
    Accepted
    26
    Uploaded By