标签:
8 1300 48 2 1 7 0
2504 1000
#include<iostream> #include<stdio.h> using namespace std; int main() { __int64 A,B; int m,i,a[10000]; while(scanf("%d",&m)) { int k=0; int sum=0; if(m==0) break; scanf("%I64d%I64d",&A,&B); sum=A+B; a[k++]=sum%m;//8 2 0001 sum=sum/m; //2 2 01 while(sum) { a[k++]=sum%m; sum=sum/m; } for(i=k-1;i>=0;i--) cout<<a[i]; cout<<endl; } return 0; }
标签:
原文地址:http://blog.csdn.net/zuguodexiaoguoabc/article/details/43882289