HDU 1877 又一版 A+B(进制转换)

看了http://lovnet.iteye.com/blog/1690276的答案

好巧妙的方法

递归实现十进制向m进制转换

#include "stdio.h"
int m;
void CK(int n)
{
    if(n>=m)
        CK(n/m);
    printf("%d",n%m);
}
int main()
{
    int a,b;
    while(~scanf("%d",&m)&&m)
    {
        scanf("%d%d",&a,&b);
        CK(a+b);
        printf("
");
    }
    return 0;
}
原文地址:https://www.cnblogs.com/kimsimple/p/6575067.html