OIer_fish @ 2024-02-21 10:00:10
```
#include<bits/stdc++.h>
using namespace std;
int main(){
char str[20];
int cnt=0,ans=0;
scanf("%s",str+1);
int len=strlen(str+1);
for(int i=1;i<=len-1;i++){
if(str[i]=='-'){
continue;
}
int now=str[i]-'0';
cnt=cnt+1;
ans+=now*cnt;
}
ans=ans%11;
if(ans=10){
if(str[len]=='X'){
cout<<"Right"<<endl;
}
else{
str[len]='X';
printf("%s\n",str+1);
}
}
else{
if(str[len]=='0'+ans){
cout<<"Right"<<endl;
}
else{
str[len]='0'+ans;
printf("%s\n",str+1);
}
}
return 0;
}
```
by OIer_fish @ 2024-02-21 10:35:34
对的 谢谢
by OIer_fish @ 2024-02-21 10:37:21
对的 我检查太不仔细了 明明知道的 麻烦了
by OIer_fish @ 2024-02-21 10:38:31
@xzy_caiji 之前看成17行了
by OIer_fish @ 2024-02-21 10:51:13
不是 看成16行了