Skip to content

Commit 229f7c0

Browse files
Create Problem_D.py
1 parent bee2c34 commit 229f7c0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

1997/Python/Problem_D.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
sets = int(input())
2+
while sets>=1:
3+
sets-=1
4+
l = []
5+
while True:
6+
k = input().split(' ')
7+
if k == ['']:
8+
break
9+
for e,t in enumerate(k):
10+
if t in l:
11+
k[e] = str(l.index(t)+1)
12+
else:
13+
l.append(t)
14+
print(' '.join(k))
15+
print('')

0 commit comments

Comments
 (0)