#include using namespace std; #define int long long signed main(){ int q;cin>>q; while(q--){ int a,b;cin>>a>>b; if(b==1){ cout<