#include <iostream> #include <string> using namespace std; // 判断一个数字是否是3的倍数 bool isDivisibleBy3(int sum) { if(sum == 0){ return false; } return sum % 3 == 0; } // 去除字符串的前导0 string removeLeadingZeros(string& num) { int i = 0; while (i < num.length() && num[i] == '0') { i++;...