#25155: 到底哪裡出錯啊!!!


conanhuang8382 (conan)


#include <bits/stdc++.h>

using namespace std;

 

int main(){

string id;

int total;

char array[26]{'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L','M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'X', 'Y', 'W', 'Z', 'I', 'O'};

cin >> id;

for (int i = 0; i <= 25; i++){

if (id[0] == array[i]){

total = 9 * ((i + 10) % 10) + (i + 10) / 10;

break;

}

}

for (int i = 1; i <= 8; i++){

total = int(id[i]) * (9 - i) + total; 

}

total = int(id[9]) + total;

cout << total << endl;

if (total % 10 == 0){

cout << "real";

}

else{

cout << "fake";

}