Lazy_Stone @ 2022-09-28 17:25:26
呜呜呜
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a[10]={0,1,2,3,4,5,6,7,8,9},c,t,n=0;
char b[100];
for(int i=1;i<=12;i++)
{
cin>>b[i];
if(b[i]!='-')
{
t++;
n=n+(b[i]-'0')*a[t];
//cout<<n<<endl;
}
}
cin>>b[13];
if(n%11 !=10){
if(n%11==b[13]-'0') cout<<"Right";
else
{
for(int i=1;i<=12;i++)
cout<<b[i];
cout<<n%11;
}}
else if(b[13]='X') cout<<"Right";
else
{
for(int i=1;i<=12;i++)
cout<<b[i];
cout<<"X";
}
return 0;
}
by World_Creater @ 2022-09-28 17:29:01
@Lazy_Stone 您打了个if(b[13]='X')
by Lazy_Stone @ 2022-09-28 17:33:41
@World_Creater 谢谢大佬 ac了 蒟蒻受教了