-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrpc.py
More file actions
54 lines (47 loc) · 1015 Bytes
/
rpc.py
File metadata and controls
54 lines (47 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
entrada = input()
lista1 = entrada.split()
n = int(lista1[0])
m = int(lista1[1])
lista =list()
def transformacion() :
global cadena
otro = ""
for u in cadena:
if u=='0':
otro = otro + 'O'
elif u == '1' :
otro = otro + 'L'
elif u=='2':
otro = otro + 'Z'
elif u=='3':
otro = otro + 'E'
elif u=='5':
otro = otro + 'S'
elif u=='6':
otro = otro + 'B'
elif u=='7':
otro = otro + 'T'
elif u=='8':
otro = otro + 'B'
else :
otro = otro + u
return otro
while n > 0 :
str = input()
lista.append(str)
n = n -1
inv = False
while m > 0 :
inv = False
cadena = input()
cadena = transformacion()
for i in lista :
con = 0
# con = cadena.find(i)
if i in cadena :
inv = True
if inv == True :
print("INVALID")
else :
print("VALID")
m = m - 1