提交时间:2025-10-08 10:54:02
运行 ID: 68566
#include<bits/stdc++.h> using namespace std; int main(){ char q[13]; int t[13]={},s=0,b=1; for(int a=0;a<13;a++)cin>>q[a]; for(int a=0;a<13;a++)t[a]=q[a]-'0'; for(int a=0;a<11;a++){ if(a!=1&&a!=5){ s+=t[a]*b; b++; } } s%=11; if(s==t[12])cout<<"Right"; else { if(s==10){ if(q[12]=='X')cout<<"Right"; else { for(int a=0;a<12;a++)cout<<q[a]; cout<<"X"; } } else { for(int a=0;a<12;a++)cout<<q[a]; cout<<s; } } return 0; }