Michelle01 @ 2023-07-07 22:10:26
#include <iostream>
#include <sstream>
using namespace std;
int g[700];
int main() {
int a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, ans;
string b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, ans11;
long long an1 = 0;
string a;
string b;
for (int i = 0; i < 13; i++) {
cin >> a[i];
}
b0 = a[0];
stringstream geek1(b0);
geek1 >> a0;
b1 = a[2];
stringstream geek2(b1);
geek2 >> a1;
b2 = a[3];
stringstream geek3(b2);
geek3 >> a2;
b3 = a[4];
stringstream geek4(b3);
geek4 >> a3;
b4 = a[6];
stringstream geek5(b4);
geek5 >> a4;
b5 = a[7];
stringstream geek6(b5);
geek6 >> a5;
b6 = a[8];
stringstream geek7(b6);
geek7 >> a6;
b7 = a[9];
stringstream geek8(b7);
geek8 >> a7;
b8 = a[10];
stringstream geek9(b8);
geek9 >> a8;
b9 = a[12];
stringstream geek10(b9);
geek10 >> a9;
an1 = a0 * 1 + a1 * 2 + a2 * 3 + a3 * 4 + a4 * 5 + a5 * 6 + a6 * 7 + a7 * 8 + a8 * 9;
an1 %= 11;
if(a9 == an1){
cout <<"Right";
return 0;
}
else{
for(int i = 0; i < 12; i++){
cout << a[i];
}
cout << an1;
}
return 0;
}
by syhx @ 2023-07-07 22:13:53
说不定是 X 的问题?
by Michelle01 @ 2023-07-08 11:46:17
@syhx dalao没听懂呀,x的问题是什么?