#include <iostream> using namespace std; void getCount(long long n, long long &a, long long &b, long long &c) { if (n == 0) { a = b = c = 0; return; } long long full = n / 3; // 完整周期数 int rem = n % 3; // 剩余字符数 // 基础次数:每个周期各1次 a = full; b = full; c = full; if (rem >= 1) a++; if (...