50分求助
查看原帖
50分求助
1394418
yjy_fywy楼主2024/9/17 15:55

只会这么写qaq

#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d,e,f,g,h,i,qwe,j1;
char q,j;
cin>>a>>q>>b>>q>>e>>q>>j;
if(j==130){
j1=10;
}else{
j1=j-48;
}
d=b%10,c=b/10%10,b/=100;
i=e%10,h=e/10%10,g=e/100%10,f=e/1000%10,e/=10000;
qwe=a+b*2+c*3+d*4+e*5+f*6+g*7+h*8+i*9;
qwe%=11;
if(qwe==j1){
cout<<"Right";
}else{
cout<<a<<"-"<<b<<c<<d<<"-"<<e<<f<<g<<h<<i<<"-"<<qwe;
}
return 0;
}
2024/9/17 15:55
加载中...