Solution for Codechef REMISS | Chef and Remissness

Hello Programmers,

The solution for codechef Chef and Remissness problem is given below.

Problem Link:- https://www.codechef.com/problems/REMISS

/*
*   Author:- Rahul Malhotra
*   Source:- Programming Vidya
*   Description:- Solution for Codechef Chef and Remissness problem
*   Problem Link:- https://www.codechef.com/problems/REMISS
*   Website:- www.programmingvidya.com
*/

#include<iostream>
using namespace std;

int main()
{
    // * Initializing variables
    int numberOfTestCases, a, b;

    // * Accepting the number of test cases
    cin>>numberOfTestCases;

    // * Executing each test case one by one
    while(numberOfTestCases--)
    {
        // * Accepting the input by both guards
        cin>>a>>b;

        /*
        *   Displaying the minimum number of times,
        *   chef could have entered into the building
        *   for the current test case
        */
        cout<<max(a,b)<<endl;

        /*
        *   Displaying the maximum number of times,
        *   chef could have entered into the building
        *   for the current test case
        */
        cout<<" "<<a+b<<endl;
    }
    return 0;
}

Happy Coding..!!

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s