zhangshudong @ 2023-05-27 20:08:57
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
char str[20];
cin >> str;
int len = strlen(str);
int sum = 0;
double remainder = 0;
sum = (str[0]-'0')* 1 + (str[2] -'0')* 2 + (str[3] -'0')* 3 +( str[4]-'0') * 4 + (str[6]-'0') * 5 + (str[7] -'0')* 6 + (str[8]-'0') * 7 + (str[9] -'0')* 8 + (str[10]-'0') * 9;
remainder = sum % 11;
if (remainder == str[12]-'0')
{
cout << "Right";
}
else
{
for(int i=0;i<12;i++)
{
cout<<str[i];
}
cout<<remainder;
}
return 0;
}
by holy @ 2023-05-29 22:02:53
我也50分,为什么没人理你呢,,,
by Sqj147 @ 2023-06-10 13:01:37
if (j == 10) j = 'X' - '0';
@holy