代码如下
#include <bits/stdc++.h>
using namespace std;
string a;
int n , tmp , x;
char mod;
int main()
{
scanf("%s" , &a);
for (int i = 0; i < 13; i++)
{
if (a[i] == '-') continue;
x++;
n = (int)a[i];
tmp += n * x;
}
if (tmp % 11 == 10) mod = 'x';
else mod = (char)(tmp % 11);
if (mod == a[12]) printf("Right");
else
{
a[12] = mod;
printf("%s" , a);
}
return 0;
}