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