Hello Programmers In this post, you will know how to solve the Second Largest Codechef Solution.Second Largest Codechef SolutionOne more thing to add, don’t directly look for the solutions, first try to solve the problems of Codechef by yourself. If you find any difficulty after trying several times, then you can look for solutions.ProblemThree numbers A, B and C are the inputs. Write a program to find second largest among them.Input The first line contains an integer T, the total number of testcases. Then T lines follow, each line contains three integers A, B and C.Output For each test case, display the second largest among A, B and C, in a new line.Constraints1 <= T <= 10001 <= A, B, C <= 1000000ExampleInput:3 120 11 400 10213 312 10 10 3 450 Output:120 312 10Second Largest CodeChef Solutions in PythonN = int(input()) for i in range(N): x = list(map(int, input().split())) x.sort() print(x[1])Second Largest CodeChef Solutions in CPP#include <iostream> using namespace std; int main(){ int a; cin >> a; while(a--){ long long a,b,c; cin >> a >> b >> c; if(a>=b && b>=c || a<=b && b<=c) cout << b << endl; else if(a>=c && c>=b || a<=c && b>=c) cout << c << endl; else cout << a << endl; } }Second Largest CodeChef Solutions in JAVAimport java.util.Arrays; import java.util.Scanner; import java.util.stream.Collectors; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int T = sc.nextInt(); for (int tc = 0; tc < T; tc++) { int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); System.out.println(solve(A, B, C)); } sc.close(); } static int solve(int A, int B, int C) { return Arrays.asList(A, B, C).stream().sorted().collect(Collectors.toList()).get(1); } }Disclaimer: The above Problem (Second Largest) is generated by CodeChef but the solution is provided by BrokenProgrammers. This tutorial is only for Educational and Learning purpose.Note:- I compile all programs, if there is any case program is not working and showing an error please let me know in the comment section. If you are using adblocker, please disable adblocker because some functions of the site may not work correctly.Next: The Lead Game Codechef Solution Post navigationPackaging Cupcakes Codechef Solution The Lead Game Codechef Solution