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..!!