Chairs Requirement Solution Codechef

June Long Challenge 2022 Solution

Chairs Requirement Solution Codechef Chef’s coding class is very famous in Chefland. This year X students joined his class and each student will require one chair to sit on. Chef already has Y chairs in his class. Determine the minimum number of new chairs Chef must buy so that every student is able to get one chair to sit … Read more

Subscriptions Solution Codechef

June Long Challenge 2022 Solution

Subscriptions Solution Codechef A new TV streaming service was recently started in Chefland called the Chef-TV. A group of N friends in Chefland want to buy Chef-TV subscriptions. We know that 6 people can share one Chef-TV subscription. Also, the cost of one Chef-TV subscription is X rupees. Determine the minimum total cost that the group of N friends will incur so that … Read more

Alternate Additions Solution Codechef

June Long Challenge 2022 Solution

Alternate Additions Solution Codechef Chef has 2 numbers A and B (A<B). Chef will perform some operations on A. In the ith operation: Chef will add 1 to A if i is odd. Chef will add 2 to A if i is even. Chef can stop at any instant. Can Chef make A equal to B? Input Format The first line contains a single integer T — the number of test cases. Then the test cases follow. The first and … Read more