基本思想:
无;
关键点:
无;
#include<iostream> #include<string> using namespace std; typedef long long ll; void charge(ll r, ll n) { if (n == 0) { cout << 0 << endl; return; } string res = ""; while (n != 0) { res = char(n%r + ‘0‘) + res; n /= r; } cout << res << endl; return; } int main() { ll n,m,k; while (cin >> k) { if (k == 0) break; cin >> m >> n; charge(k, m + n); } }
原文:https://www.cnblogs.com/songlinxuan/p/12460055.html