大佬能帮我看看我这道题哪错了吗
2026-08-10 16:18:14
发布于:浙江
5阅读
0回复
0点赞
代码:
#include<bits/stdc++.h>
using namespace std;
char ap[11111111];
int main(){
int a,b,c,d,e,f,g,h,i,j;
cin>>a>>b>>c>>d>>e>>f>>g>>h>>i>>j;
b=abs(b);
e=abs(c);
j=abs(d);
f=e%10000/1000;
g=e%1000/100;
h=e%100/10;
i=e%10;
e=e/10000;
c=b%100/10;
d=b%10;
b=b/100;
int sum=(a*1+b*2+c*3+d*4+e*5+f*6+g*7+h*8+i*9)%11;
if(sum==j){
cout<<"Right";
}else if(sum==10){
cout<<"Right";
}else{
cout<<a<<"-"<<b<<c<<d<<"-"<<e<<f<<g<<h<<i<<"-"<<sum;
}
return 0;
这里空空如也








有帮助,赞一个