得到一个 a 需要 1 个 a得到一个 b 需要 2 个 a得到一个 c 需要 4 个 a得到一个 d 需要 8 个 a不难发现对于每个字母就好比二进制上的一位数例如 n=11 时,二进制为1011,很明显用每个二进制位上对应的字母构造出 n 是字符最少的 #include <bits/stdc++.h> using namespace std; #define int long long const int N = 2e5 + 5; int __t = 1, n; void solve() { cin >> n; for (int i = 25; i ...