FTHX @ 2024-01-23 08:53:55
#include <iostream>
using namespace std;
char a[13 + 1];
int ans;
int main() {
for (int i = 1; i <= 12; i++) {
cin >> a[i];
if (a[i] == '-')
continue;
else if (i == 12)
break;
ans = ans + (a[i] * i);
}
if (ans % 11 == a[12]) {
cout << "Right";
} else {
for (int i = 1; i <= 12; i++) {
if (i == 12) {
cout << ans % 11;
break;
}
cout << a[i];
}
}
return 0;
}
by Winds_Land @ 2024-01-23 17:43:21
如果余数为10,则识别码为大写字母 X 应该有这个问题吧,其他的你再看看
by FTHX @ 2024-03-05 16:57:06
@Winds_Land 谢谢