//Author:PanDaoxi #includeusing namespace std; const int N=1000000; int a,n,q[N]; void blash(int a,int n){ q[1]=a; int rear=1,front1=1,front2=1; while(rear<=n){ long long x=2*q[front1]+1; long long y=3*q[front2]+1; if(x y){ q[++rear]=y; front2++; } else{ q[++rear]=x; front1++; front2++; } } } cout< >a>>n){ blash(a,n); } return 0; }



