1 solutions

  • 1
    @ 2026-8-5 16:06:59
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        long long n;
    	cin>>n;
    	for(int i=1;i<=n;i++)
    	{
    		long long a,b,c;
    		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/a<<endl;
    		}
    	}
    	return 0; 
    }
    
    • 1

    Information

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