@[ZZYjinitaimei](/user/996200) 仅供参考
```
#include<iostream>
#include<cstring>
using namespace std;
int main(){
char s[20];
cin>>s;
int len=strlen(s);
int k=1,y=0;
for(int i=0;i<=len-2;i++){
if(s[i]=='-'){
continue;
}else{
y=y+k*(s[i]-'0');
k++;
}
}
y=y%11;
char c=y+'0';
if(y==10){
c='X';
}
if(c==s[len-1]){
cout<<"Right";
}else{
for(int i=0;i<=len-2;i++){
cout<<s[i];
}
cout<<c;
}
return 0;
}
```
by MTF_Lambda_04 @ 2023-07-26 09:34:27
@[MTF_Birdwatchers](/user/898114) 谢谢大佬!
by ZZYjinitaimei @ 2023-07-26 09:38:40
@[ZZYjinitaimei](/user/996200) 我不是大佬我还是一只蒻得不能再蒻的蒟蒻(~~如果您不介意的话我想要个关注~~
by MTF_Lambda_04 @ 2023-07-26 09:40:28
@[MTF_Birdwatchers](/user/898114) 没事,关注啦!
by ZZYjinitaimei @ 2023-07-26 09:42:11
@[ZZYjinitaimei](/user/996200) Very Thanks!
by MTF_Lambda_04 @ 2023-07-26 09:43:06
@[ZZYjinitaimei](/user/996200) 警钟长鸣一下,这里输入不仅要加一个X的特判,输出也要!
by dienter @ 2023-07-27 17:28:41
@[dienter](/user/933643) OK,谢谢大佬!
by ZZYjinitaimei @ 2023-07-28 09:00:33