I_AK_IOI_EVERY_DAY @ 2023-09-29 23:06:53
#include<bits/stdc++.h>
using namespace std;
int main(){
char a,b,c,d,e,f,g,h,i,j;
int sum;
int num;
scanf("%c-%c%c%c-%c%c%c%c%c-%c",&a,&b,&c,&d,&e,&f,&g,&h,&i,&j);
sum=a*1+b*2+c*3+d*4+e*5+f*6+g*7+h*8+i*9;
num=sum%11;
if(j==num){
cout<<"Right"<<endl;
}
else{
printf("%c-%c%c%c-%c%c%c%c%c-%n",a,b,c,d,e,f,g,h,i,num);
}
return 0;
}
by I_AK_IOI_EVERY_DAY @ 2023-09-29 23:09:14
学校比赛出的,太难叻(
by hexuchen @ 2023-09-30 15:32:33
@I_AK_IOI_EVERY_DAY 你的变量a,b,c,d,e,f,g,h,u,j是字符型,不能直接乘,要把字符型转化为整形再乘