#4和#7不过啊
查看原帖
#4和#7不过啊
604009
WoW0o0楼主2021/11/9 19:46
#include<bits/stdc++.h>
using namespace std;
int main(){
	char ch[13];
	long n;
	for(int i=0;i<13;i++){
		cin>>ch[i];
	}
	n=(ch[0]-'0')*1+(ch[2]-'0')*2+(ch[3]-'0')*3+(ch[4]-'0')*4+(ch[6]-'0')*5+(ch[7]-'0')*6+(ch[8]-'0')*7+(ch[9]-'0')*8+(ch[10]-'0')*9;
	n=n%11;
	if((ch[12]-'0')==n)cout<<"Right";
	else {
		ch[12]=n+'0';
	    if((ch[12]-'0')==10){
	      for(int j=0;j<12;j++)cout<<ch[j];
	      cout<<"X"; 
	   } 
	    else for(int j=0;j<13;j++)cout<<ch[j];
	}
   return 0;
}
2021/11/9 19:46
加载中...