shaddock_qwq @ 2021-11-27 15:27:43
#include<bits/stdc++.h>
using namespace std;
int main()
{
char s[13];
int f=0;
cin>>s;
f+=(s[0]-'0')*1;
f+=(s[2]-'0')*2;
f+=(s[3]-'0')*3;
f+=(s[4]-'0')*4;
f+=(s[6]-'0')*5;
f+=(s[7]-'0')*6;
f+=(s[8]-'0')*7;
f+=(s[9]-'0')*8;
f+=(s[10]-'0')*9;
f%=11;
if(s[12]-'0'==f or (s[12]==88 and (int)s[12]-78==10))
{
cout<<"Right";
}
else
{
for(int i=0;i<12;i++)
{
cout<<s[i];
}
if(f==10)
{
cout<<"X";
}
else
{
cout<<f;
}
}
return 0;
}
//1 5 11
by zelei111 @ 2022-01-05 20:25:19
c++ 这么方便吗?