#include <iostream>
using namespace std;
bool real(char *s)
{
int num[26] = { 10, 11, 12, 13, 14, 15, 16, 17, 34, 18, 19, 20, 21, 22, 35, 23, 24, 25, 26, 27, 28, 29, 32, 30, 31, 33 };
int result = (num[s[0] - 'A'] / 10) + 9 * (num[s[0] - 'A'] % 10);
for (int i = 8; i > 0; i--)
{
s++;
result += i * (*s - '0');
}
s++;
result += (*s - '0');
return (result % 10 == 0);
}
int main()
{
char *s;
while (~scanf("%s", s))
{
printf(real(s) ? "real\n" : "fake\n");
}
}
請問為什麼這個程式會RE呢?