11585 | 2024-10-27 14:13:55 | balint | Felhasználónevek | python3 | Wrong answer 20/100 | 407ms | 20408 KiB |
def main():
username = input()
length = len(username)
takens = set()
for _ in range(int(input())):
name = input()
if len(name) == length:
if name == username:
takens.add(0)
elif len(name) > length:
if name[:length] == username:
if name[length:].isdigit():
takens.add(int(name[length:]))
i = 0
while True:
if i not in takens:
if i == 0:
print(username)
else:
print(username + str(i))
return
i+= 1
main()
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 16ms | 3128 KiB | ||||
2 | Accepted | 16ms | 2980 KiB | ||||
subtask2 | 20/20 | ||||||
3 | Accepted | 16ms | 3316 KiB | ||||
4 | Accepted | 16ms | 3036 KiB | ||||
subtask3 | 0/40 | ||||||
5 | Accepted | 17ms | 3128 KiB | ||||
6 | Accepted | 17ms | 3124 KiB | ||||
7 | Accepted | 17ms | 3004 KiB | ||||
8 | Accepted | 17ms | 3128 KiB | ||||
9 | Accepted | 16ms | 3016 KiB | ||||
10 | Accepted | 16ms | 3128 KiB | ||||
11 | Accepted | 17ms | 3320 KiB | ||||
12 | Accepted | 16ms | 3324 KiB | ||||
13 | Wrong answer | 16ms | 3312 KiB | ||||
14 | Wrong answer | 16ms | 3128 KiB | ||||
subtask4 | 0/40 | ||||||
15 | Accepted | 363ms | 20392 KiB | ||||
16 | Accepted | 372ms | 20276 KiB | ||||
17 | Accepted | 370ms | 20244 KiB | ||||
18 | Accepted | 370ms | 20408 KiB | ||||
19 | Accepted | 381ms | 20196 KiB | ||||
20 | Accepted | 407ms | 20256 KiB | ||||
21 | Accepted | 405ms | 20328 KiB | ||||
22 | Accepted | 388ms | 20388 KiB | ||||
23 | Wrong answer | 263ms | 6400 KiB | ||||
24 | Wrong answer | 263ms | 6400 KiB | ||||
25 | Wrong answer | 268ms | 6400 KiB | ||||
26 | Wrong answer | 259ms | 6400 KiB | ||||
27 | Wrong answer | 375ms | 20392 KiB |