number = input()number_list =list(number)DDD = {"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"}number_list[0] = DDD[number_list[0]]run_time_1 = len(number_list)for run in range(run_time_1):number_list[run] = eval(number_list[run])ans = ""for run in range(run_time_1):ans += str(number_list[run])ans = list(ans)ans = ans[::-1]for run in range(len(ans)):ans[run] = eval(ans[run])for run in range(len(ans)-2):ans[run+1] = ans[run+1] * (run+1)chcek_num = 0for run in range(len(ans)):chcek_num += ans[run]check = chcek_num % 10if check == 0 :print ("real")else :print ("fake")
不用那麼難吧!