#include<iostream>
using namespace std;
int main()
{
int a,b,c,N;
int i=0,count=0;
int s[1001];
cin>>a>>b>>N;
c=a+b;
while(c>=N)
{
s[i]=c%N;
i++;
c=c/N;
count++;
}
s[count]=c;
for(int i=count;i>=0;i--)
{
cout<<s[i];
}
return 0;
}
09-17
144
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-06
101
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)