文章
1
粉丝
102
获赞
0
访问
799
#include<iostream>
#include<string>
using namespace std;
int main()
{
string a;
cin>>a;
int len=a.size();
int s=0;
s=(a[0]-'0')*1+(a[2]-'0')*2+(a[3]-'0')*3+(a[4]-'0')*4+(a[6]-'0')*5+(a[7]-'0')*6+(a[8]-'0')*7+(a[9]-'0')*8+(a[10]-'0')*9;
int x=s%11;
if(x==a[12]-'0')
{
cout<<"Right"<<endl;
return 0;
}
else if(a[12]=='X'&&x==10)
{
cout<<"Right"<<endl;
return 0;
}
else
{
for(int i=0;i<len-1;i++)
{
...
登录后发布评论
暂无评论,来抢沙发