#30474: python解


8077963@gmail.com (微積分好難)

學校 : 淡江大學
編號 : 151453
來源 : [223.137.176.74]
最後登入時間 :
2022-08-29 23:29:02
a020. 身分證檢驗 | From: [111.250.95.238] | 發表日期 : 2022-05-23 20:23

num = input()
area = {'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}

num = num.replace(num[0],str(area[num[0]]))
total = int(num[0]) + int(num[10])

for i in range(1,10):
    total += int(num[i])*(10-i)

print("fake" if total%10 else "real")

 
#31818: Re: python解


e105183@ms.nnkieh.tn.edu.tw (110畢業莊明勳)

學校 : 不指定學校
編號 : 199509
來源 : [111.255.131.87]
最後登入時間 :
2022-11-06 16:25:05
a020. 身分證檢驗 | From: [111.255.64.174] | 發表日期 : 2022-08-21 13:44

num = input()
area = {'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}

num = num.replace(num[0],str(area[num[0]]))
total = int(num[0]) + int(num[10])

for i in range(1,10):
    total += int(num[i])*(10-i)

print("fake" if total%10 else "real")

??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????啥意思???????????????????????????????????????????????????????

 

 
ZeroJudge Forum