a+b的m进制结果
#include<stdio.h>
#include<string.h>
int main()
{
int a,b,m,i;int t[100];
while(scanf("%d",&m)!=EOF ,m)
{
scanf("%d%d",&a,&b);
memset(t,0,sizeof(t));
a+=b;i=0;
if(a==0) {printf("0\n");continue;}
while(a!=0)
{
t[i]=a%m;
a/=m;
i++;
}
while(i--)
{
printf("%d",t[i]);
}
printf("\n");
}
return 0;
}