题目:
题解:
int main(){
string code ;
cin >> code;
int out = 0;
char right;
int j=1;
for(int i= 0 ; i<code.length()-2;i++){
if(isdigit(code[i])){
int num= (code[i]-48)*j;
j++;
out += num;
}
}
out = out %11;
if(out==10){
right = 'X';
}else{
right = char(48+out);//48是'O'的ASCII
}
if(right == code[code.length()-1]){
cout << "Right\n";
}else{
cout << code.substr(0,12)<<right;
}
}