#include <stdio.h>
#include <string.h>
#include <iostream>
using namespace std;
int main(){
string c;
cin>>c;
char ans;
int sum = ((c[0]-'0')+(c[2]-'0')*2+(c[3]-'0')*3+(c[4]-'0')*4+(c[6]-'0')*5+(c[7]-'0')*6+
(c[8]-'0')*7+(c[9]-'0')*8+(c[10]-'0')*9)%11;
if(sum == 10){
ans = 'X';
}else{
ans = sum+'0';
}
if(c[12] == ans){
printf("Right");
}else{
c[12] = ans;
cout<<c;
}
return 0;
}
201312-2ISBN号码(满分代码)
最新推荐文章于 2022-09-25 21:57:31 发布