鱿鱼 @ 2023-02-01 18:45:47
#include<bits/stdc++.h>
using namespace std;
int main()
{
char a[14];
char mod[12]="0123456789X";
int ans=0;
int j=1;
cin>>a;
for(int i=0;i<=11;i++)
{
if(a[i]=='-')continue;
else ans=ans+(a[i]-'0')*(j++);
}
if((a[12]-'0')==ans%11 )cout<<"Right";
else
{
a[12]=mod[ans%11];
cout<<a;
}
return 0;
}
by zjr0330 @ 2023-02-21 19:26:31
如果是"X"呢?