@@ -0,0 +1,1979 @@
+package java_problems.beginner;%0D%0A%0D%0Aimport java.util.Scanner;%0D%0A%0D%0A/*%0D%0A * Chef is now a corporate person. He has to attend office regularly. But chef%0D%0A * does not want to go to office, rather he wants to stay home and discover%0D%0A * different recipes and cook them.%0D%0A * In the office where chef works, has two guards who count how many times a%0D%0A * person enters into the office building. Though the duty of a guard is 24 hour%0D%0A * in a day, but sometimes they fall asleep during their duty and could not%0D%0A * track the entry of a person in the office building. But one better thing is%0D%0A * that they never fall asleep at the same time. At least one of them remains%0D%0A * awake and counts who enters into the office.%0D%0A * Now boss of Chef wants to calculate how many times Chef has entered into the%0D%0A * building. He asked to the guard and they give him two integers A and B, count%0D%0A * of first guard and second guard respectively.%0D%0A * Help the boss to count the minimum and maximum number of times Chef could%0D%0A * have entered into the office building.%0D%0A * %0D%0A * Input: %0D%0A * The first line of the input contains an integer T denoting the number of test%0D%0A * cases. The description of the T test cases follows.%0D%0A * Each test case consists of a line containing two space separated integers A%0D%0A * and B.%0D%0A * %0D%0A * Output: %0D%0A * For each test case, output a single line containing two space separated%0D%0A * integers, the minimum and maximum number of times Chef could have entered%0D%0A * into the office building.%0D%0A * %0D%0A * Constraints: %0D%0A * 1 %3C= T %3C= 100%0D%0A * 0 %3C= A, B %3C= 1000000%0D%0A * %0D%0A * Example %0D%0A * Input:%0D%0A * 1%0D%0A * 19 17%0D%0A * %0D%0A * Output:%0D%0A * 19 36%0D%0A */%0D%0Apublic class ChefAndRemissness %7B%0D%0A%0D%0A%09public static void main(String%5B%5D args) %7B%0D%0A%09%09%0D%0A%09%09Scanner sc = new Scanner(System.in);%0D%0A%09%09int numCases = Integer.parseInt(sc.nextLine());%0D%0A%09%09for (int i = 0; i %3C numCases; i++) %7B%0D%0A%09%09%09int A = sc.nextInt();%0D%0A%09%09%09int B = sc.nextInt();%0D%0A%09%09%09System.out.println(Math.max(A, B) + %22 %22 + (A + B));%0D%0A%09%09%7D%0D%0A%09%09sc.close();%0D%0A%09%7D%0D%0A%7D

Add ChefAndRemissness