Help me in solving CHANGEXY problem

My issue

I think the output of second testcase should be 3 instead of 2

My code

#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here
    int t;cin>>t;
    while(t--){
        int a,b,k;
        cin>>a>>b>>k;
        
    }
}

Problem Link: Change A to B Practice Coding Problem

no ans would be 2
3+1=4
4*2=8
only two operation needed

1 Like

Okaay thank you… understood now…

@iiitian2022
hint : instead of going from a to b
go from b to a