组合题6 个小题
已作答 0 / 6
11 #include <iostream>22 #include <algorithm>3344 using namespace std;5566 const int MAXL = 1000;7788 int n, k, ans[MAXL];991010 int main(void)1111 {1212 cin >> n >> k;1313 if (!n) cout << 0 << endl;1414 else1515 {1616 int m = 0;1717 while (n)1818 {1919 ans[m++] = (n % (-k) + k) % k;2020 n = (ans[m - 1] - n) / k;2121 }2222 for (int i = m - 1; i >= 0; i--)2323 cout << char(ans[i] >= 10 ?2424 ans[i] + 'A' - 10 :2525 ans[i] + '0');2626 cout << endl;2727 }2828 return 0;2929 }假设输入的 n 在 int 范围内,k 为不小于 2 且不大于 36 的正整数,完成下面的判断题和单选题:
判断题
当输入为“100 7”时,输出为( )。