#ifndef call_from_test #include using namespace std; #endif //BEGIN CUT HERE template vector convert_base(T x,T b){ vector res; T t=1,k=abs(b); while(x){ res.emplace_back((x*t)%k); if(res.back()<0) res.back()+=k; x-=res.back()*t; x/=k; t*=b/k; } if(res.empty()) res.emplace_back(0); reverse(res.begin(),res.end()); return res; } //END CUT HERE #ifndef call_from_test //INSERT ABOVE HERE // verify positive base signed YUKI_499(){ long long p; cin>>p; auto ans=convert_base(p,7LL); for(auto x:ans) cout<