#include int main(){ int T; int B; std::cin>>T; std::cin>>B; for(int i=0;i>N; std::string ans=""; while(N!=0){ int add=N%B; while(add<0)add-=B; ans=std::to_string(add)+ans; N-=add; N/=B; } std::cout<