#21271: Python 3 using dictionaries


jerjer920813@gmail.com (YJ)

學校 : 國立政治大學附屬高級中學
編號 : 101106
來源 : [223.136.137.66]
最後登入時間 :
2020-05-16 09:00:54
a135. 12250 - Language Detection -- UVa12250 | From: [223.137.61.227] | 發表日期 : 2020-05-10 19:11

a = {"HELLO": "ENGLISH", "HOLA": "SPANISH", "HALLO": "GERMAN", "BONJOUR": "FRENCH","CIAO": "ITALIAN", "ZDRAVSTVUJTE": "RUSSIAN" }
p = 1
b = "UNKNOWN"
while True:
n = input()
if n == "#":
break
else:
print(f"Case {p}: {a.get(n,b)}")
p += 1
 
ZeroJudge Forum