jiaweiLIU2415 @ 2024-10-06 13:31:30
#include<stdio.h>
int main()
{
char a[14];
scanf("%s",a);
int i,j=0,sum=0;
for(i=0;i<12;i++)
{
if(a[i]=='-')
continue;
else
{
j++;
sum+=j*(a[i]-'0');
sum=sum%11;
}
}
if(a[12]-'0'==sum||a[12]=='x'&&sum==10)
printf("Right");
else
{
for(int b=0;b<12;b++)
{
printf("%c",a[b]);
}
if(sum==10)
{
printf("x");
}
else
printf("%d",sum);
}
return 0;
}
by wuyuxuan20090114 @ 2024-10-13 19:54:06
x大写