#include <iostream> #include <string> using namespace std; int main() { string strTest; cin >> strTest; int length = strTest.size(); if(stoi(strTest.substr(length - 1, 1)) == 0){ //如果输入的最后一位是0,则剔除。 strTest.erase(length - 1, 1); length--; } int arr[10] = {0}; //数字不超过9个数。使用数组下标存储出现过的...