-
Notifications
You must be signed in to change notification settings - Fork 62
/
CHEFPDIG.py
71 lines (67 loc) · 1.86 KB
/
CHEFPDIG.py
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# made by vanguard7
def main():
t = int(input())
for i in range(t):
l = list(input())
six = l.count('6')
seven = l.count('7')
eight = l.count('8')
if six != 0:
if '5' in l:
print("A", end="")
if six > 1:
print("B", end="")
if seven != 0:
print("C", end="")
if eight != 0:
print("D", end="")
if '9' in l:
print("E", end="")
if seven != 0:
if '0' in l:
print("F", end="")
if '1' in l:
print("G", end="")
if '2' in l:
print("H", end="")
if '3' in l:
print("I", end="")
if '4' in l:
print("J", end="")
if '5' in l:
print("K", end="")
if six != 0:
print("L", end="")
if seven > 1:
print("M", end="")
if eight != 0:
print("N", end="")
if '9' in l:
print("O", end="")
if eight != 0:
if '0' in l:
print("P", end="")
if '1' in l:
print("Q", end="")
if '2' in l:
print("R", end="")
if '3' in l:
print("S", end="")
if '4' in l:
print("T", end="")
if '5' in l:
print("U", end="")
if six != 0:
print("V", end="")
if seven != 0:
print("W", end="")
if eight > 1:
print("X", end="")
if '9' in l:
print("Y", end="")
if '9' in l:
if '0' in l:
print("Z", end="")
print()
if __name__ == '__main__':
main()