This post is all about the solution of the "Building Race" Codechef October Long Challenge 2022 Problem Statement.
Problem Statement :
Chef and Chefina, 2 friends, are presently on storey AA as well as BB, respectively. They hear an official statement that awards are being spread on the bottom floor and decide to rush to the bottom floor.
Chef can descend XX floors for every minute, while Chefina descends YY floors for every minute. Determine who is the first to reach the bottom floor. If both arrive at the ground floor on the same time, print Both.
Format of Input :
- The number of cases will be noted by a single integer TT on the first line of input.
- Evey test case's 1st line comprises 4 space-separated integer values AA, BB, XX, and YY — the current floor of Cook, the current floor of Chefina, the pace of Cook, and the pace of Chefina in floors per moment.
Format of the Output :
- On a new line, output the following for each test case:
- "Cook" if Cook is the first person to reach the bottom floor.
- "Chefina" if she becomes the first to reach the bottom floor.
- If "both" arrive at the bottom floor on the same time.
Evey character inside the string can be printed either in capital letters or lower case letters. The strings CHef, chEf, cheF for example, are all considered to be synonymous.
Single Operation Part 1 Codechef October Long Challenge 2022 Problem Solution Click Here
Binary Substituition Codechef October Long Challenge 2022 Problem Solution Click Here
Also Read :- Top Programming Languages of 2022 Click Here
Interactive Brokers is Hiring Fresher for the role of Backend Developer 2022, Apply Now
SOLVERINES TECHNOLOGY SOLUTIONS PRIVATE LIMITED is Hiring for Software Associate Developer - Trainee 2022 Apply Now
LogiNext is Hiring for Junior Software Engineer 2022 Apply Now
Couchbase is Hiring for Graduate Software Engineer , Freshers as well as Experience candidates can apply Apply Now
Teamlease Digital Private Limited is Hiring for Software Engineer 2022 Apply Now



0 Comments