en_num = {'A': 10, 'B': 11, 'C': 12, 'D': 13, 'E': 14, 'F': 15, 'G': 16, 'H': 17, 'I': 34, 'J': 18, 'K': 19, 'L': 20, 'M': 21,
'N': 22, '0': 35, 'P': 23, 'Q': 24, 'R': 25, 'S': 26, 'T': 27, 'U': 28, 'V': 29, 'W': 32, 'X': 30, 'Y': 31, 'Z': 33}
def num_id(n): #把傳入的第一個英文字母轉成數字後回傳
temp = [i for i in en_num]
for i in range(len(temp)):
if n == temp[i]:
output = en_num[temp[i]]
return output
while True:
try:
id = input()
if (len(id)) != 10:
print('fake')
break
ans = 0
first_num = num_id(id[0])
first_num = (first_num//10)+(first_num % 10)*9
for i in range(1, 9):
ans += int(id[i])*(9-i)
ans = ans+first_num+int(id[-1])
if (ans % 10) == 0:
print('real')
else:
print('fake')
except:
break
#13: 4% WA (line:1)
您共輸出 0 行。