Hello Programmers In this post, you will know how to solve the Richie Rich Codechef Solution.Richie Rich 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.ProblemChef aims to be the richest person in Chefland by his new restaurant franchise. Currently, his assets are worth AA billion dollars and have no liabilities. He aims to increase his assets by XX billion dollars per year.Also, all the richest people in Chefland are not planning to grow and maintain their current worth.To be the richest person in Chefland, he needs to be worth at least BB billion dollars. How many years will it take Chef to reach his goal if his value increases by XX billion dollars each year?InputThe first line contains an integer TT, the number of test cases. Then the test cases follow.Each test case contains a single line of input, three integers AA, BB, XX.OutputFor each test case, output in a single line the answer to the problem.Constraints1≤T≤21 0001≤T≤21 000100≤A<B≤200100≤A<B≤2001≤X≤501≤X≤50XX divides B−AB−ASubtasksSubtask #1 (100 points): Original constraintsSample Input3 100 200 10 111 199 11 190 200 10 Sample Output10 8 1 ExplanationTest Case 11: Chef needs to increase his worth by 200−100=100200−100=100 billion dollars and his increment per year being 1010 billion dollars, so it will take him 10010=1010010=10 years to do so.Test Case 22: Chef needs to increase his worth by 199−111=88199−111=88 billion dollars and his increment per year being 1111 billion dollars, so it will take him 8811=88811=8 years to do so.Test Case 33: Chef needs to increase his worth by 200−190=10200−190=10 billion dollars and his increment per year being 1010 billion dollars, so it will take him 1010=11010=1 year to do so.Richie Rich CodeChef Solutions in JAVAimport java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { try{ Scanner sc = new Scanner(System.in); int t = sc.nextInt(); for(int i=0;i<t;i++){ int A = sc.nextInt(); int B = sc.nextInt(); int X = sc.nextInt(); int need_to_increase = B - A; int years = need_to_increase / X; System.out.println(years); } }catch(Exception e){ return; } } } Richie Rich CodeChef Solutions in CPP#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; for(int i=0;i<t;i++) { int a,b,x; cin>>a>>b>>x; int z=(b-a)/x; cout<<z<<endl; } return 0; }Richie Rich CodeChef Solution in Pythont=int(input()) for i in range(t): a,b,c=map(int,input().split()) print((b-a)//c)Disclaimer: The above Problem (Richie Rich) 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: Chef and Demonetisation Codechef Solution Post navigationMalvika is peculiar about color of balloons Codechef Solution Chef and Demonetisation Codechef Solution