RT。
#include<iostream> using namespace std; int main(){ long long x,k; cin>>x>>k; for(int i=0;i<k;i++){ x++; if(x%3==0)x/=3; } cout<<x; return 0; }