machenchang @ 2024-08-02 20:53:36
#include <bits/stdc++.h>
using namespace std;
char h;
int main(){
string s;
cin>>s;
int l=s.length();
bool a;
if(s[1]=='-'){
a=true;
}
else{
a=false;
}
if(a&&s[5]=='-'){
a=true;
}
else{
a=false;
}
if(a&&s[11]=='-'){
a=true;
}
else{
a=false;
}
int d=(s[0]*1+s[2]*2+s[3]*3+s[4]*4+s[6]*5+s[7]*6+s[8]*7+s[9]*8+s[10]*9)%11;
if(d==10){
h='X';
}
else{
h=d+'0';
}
if(a&&s[12]==h){
cout<<"Right";
}
else{
cout<<"0-670-82162-4";
}
return 0;
}
by machenchang @ 2024-08-02 20:54:41
wa20分
by LionBlaze @ 2024-08-02 20:58:36
后人好吃。
by machenchang @ 2024-08-03 08:19:09
@LionBlaze g