课本AC代码 #include <cstdio> int main() { int a, b, d; scanf("%d%d%d", &a, &b, &d); int sum = a + b; int ans[31], num = 0; do { ans[num++] = sum % d; sum /= d; } while(sum != 0); for(int i = num - 1; i >= 0; i--) { printf("…
1010 Radix (25)(25 分) Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "yes", if 6 is a decimal number and 110 is a binary number. Now for any pair of positive integers N1 and N2, your t…
Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is “yes”, if 6 is a decimal number and 110 is a binary number.Now for any pair of positive integers N1 and N2, your task is to find the radix of…