模拟题
#include<iostream>
#include<algorithm>
using namespace std;
const int N = 50;
char arr[N];
int main () {
int i = 0,ans = 0,t = 1;
cin >> arr;
while (i < 12) {
if (arr[i] >= '0' && arr[i] <= '9') {
ans += (arr[i] - '0') * t;
t++;
}
i++;
}
if (ans % 11 == 10) {
char c = 'X';
if (arr[12] == c) cout << "Right" << endl;
else {
arr[12] = c;
cout << arr << endl;
}
} else {
if (ans % 11 == arr[12] - '0') cout << "Right" << endl;
else {
arr[12] = ans % 11 + '0';
cout << arr << endl;
}
}
return 0;
}