。。。救救孩子把```cpp
#include
#include
using namespace std;
int main() {
string ISBN;
getline(cin, ISBN);
int len = ISBN.size();
int all=0;
int lu = 0;
for (int i = 0; i < len-1; i++) {
if (ISBN[i] == '-') { lu++; continue; }
all += (ISBN[i]-'0') * (i - lu + 1);
}
int res = all % 11;
if (res == 10) {
if (ISBN[len - 1] == 'X') { cout << "Right"; return 0; }
else {
for (int j = 0; j < len - 1; j++) {
cout << ISBN[j];
}
cout << 'X'; return 0;
}
}
if (all % 11 == (ISBN[len - 1]-'0')) {
cout << "Right";
}
else {
for (int j = 0; j < len - 1; j++) {
cout << ISBN[j];
}
cout << res;
}
return 0;
}