#18883: Python


jay1060920909@gmail.com (Jay Chen)

學校 : 桃園市立大成國民中學
編號 : 84276
來源 : [118.168.12.205]
最後登入時間 :
2022-12-17 21:40:06
a020. 身分證檢驗 | From: [193.116.234.252] | 發表日期 : 2019-08-11 17:07

dic = {'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,'O':35,
'P':23,'Q':24,'R':25,'S':26,'T':27,
'U':28,'V':29,'W':32,'X':30,'Y':31,
'Z':33}

code = input()

res = list(str(dic[code[0]]))

res.extend(code[1:])

res = [int(res) for res in res]


num = [i for i in range(9,0,-1)]

for i in range(len(num)):
index = 10-num[i]
res[index] = res[index]*num[i]

if sum(res) % 10 == 0:
print('real')
else:
print('fake')
 
ZeroJudge Forum