Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
68566 1q1q1q ISBN号码 C++ 通过 0 MS 256 KB 499 2025-10-08 10:54:02

Tests(10/10):


#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; }


测评信息: