查看题目
#include <bits/stdc++.h>
using namespace std;
char x[13];
int main()
{
int s = 0;
cin >> x;
s += (x[0] - '0') * 1;
s += (x[2] - '0') * 2;
s += (x[3] - '0') * 3;
s += (x[4] - '0') * 4;
s += (x[6] - '0') * 5;
s += (x[7] - '0') * 6;
s += (x[8] - '0') * 7;
s += (x[9] - '0') * 8;
s += (x[10] - '0') * 9;
s %= 11;
if (s == 10)
{
if (x[12] == 'X')
cout << "Right" << endl;
else
{
x[12] = 'X';
cout << x << endl;
}
}
else
{
if (s == x[12] - '0')
cout << "Right" << endl;
else
{
x[12] = s + '0';
cout << x << endl;
}
}
return 0;
}