#include<iostream>
#include<string>
using namespace std;
int main()
{
string a;
int sum=0;
int alp=0;
while(cin>>a){
if(a[0] == 'A')alp = 1;
else if(a[0] == 'B')alp = 10;
else if(a[0] == 'C')alp = 19;
else if(a[0] == 'D')alp = 28;
else if(a[0] == 'E')alp = 37;
else if(a[0] == 'F')alp = 46;
else if(a[0] == 'G')alp = 55;
else if(a[0] == 'H')alp = 64;
else if(a[0] == 'I')alp = 39;
else if(a[0] == 'J')alp = 73;
else if(a[0] == 'K')alp = 82;
else if(a[0] == 'L')alp = 2;
else if(a[0] == 'M')alp = 11;
else if(a[0] == 'N')alp = 20;
else if(a[0] == 'O')alp = 48;
else if(a[0] == 'P')alp = 29;
else if(a[0] == 'Q')alp = 38;
else if(a[0] == 'R')alp = 47;
else if(a[0] == 'S')alp = 56;
else if(a[0] == 'T')alp = 65;
else if(a[0] == 'U')alp = 74;
else if(a[0] == 'V')alp = 83;
else if(a[0] == 'X')alp = 3;
else if(a[0] == 'Y')alp = 12;
else if(a[0] == 'Z')alp = 30;
sum=alp+((int)(a[9])-48);
for(int i=1 , j=8 ; i<=8 , j>=1 ; i++ , j--){
sum+=((int)(a[i])-48)*j;
}
if(sum%10==0)
cout<<"real"<<endl;
else
cout<<"fake"<<endl;
}
return 0;
}
因為你少了 a[0] == 'R'
……
少一航
少a[0] == 'W'吧?
因為你少了 a[0] == 'R'
……
說錯了,是少了 a[0] == 'W'
(zerojudge沒有刪除留言的功能有夠尷尬……)