ycyy @ 2023-08-10 16:02:28
#include<iostream>
#include<math.h>
using namespace std;
int main(){
char a[13],c;
cin>>a;
int j=0,k=0;
for(int i=0;i<11;i++){
if(a[i]!='-')
{
k++;
j+=(a[i]-'0')*k;
}
}
j=j%11;
if(j==10)c='X';
else c=j+'0';
if(c==a[12])cout<<"Right";
else {
a[12]=c;
for(int i=0;i<13;i++)
{
cout<<a[i];
}//把for循环换成cout<<a;最后多一个白框
}
return 0;
}
by gongziwen @ 2023-08-10 16:38:20
@ycyy '\0'
by ycyy @ 2023-08-10 16:50:53
@ud2_ 感谢
by ycyy @ 2023-08-10 16:51:06
@gongziwen 感谢