| 19962 | 2025-12-30 16:08:03 | beni | Felhasználónevek | python3 | Runtime error 0/100 | 586ms | 21436 KiB |
import sys
# sys.stdin = open('input.txt')
# sys.stdout = open('output.txt', 'w')
S = input().strip()
N = int(input().strip())
U = ["" for i in range(N)]
for i in range(N):
U[i] = input().strip()
eredmeny = ""
U.sort()
hol = 0
if S in U:
hol = U.index(S)
else:
eredmeny = S
i = 0
while eredmeny == "":
i += 1
hol += 1
if U[hol] != S + str(i):
eredmeny == S + str(i)
print(eredmeny)
sys.stdout.close()
| Subtask | Sum | Test | Verdict | Time | Memory | ||
|---|---|---|---|---|---|---|---|
| subtask1 | 0/0 | ||||||
| 1 | Accepted | 16ms | 3312 KiB | ||||
| 2 | Runtime error | 16ms | 2868 KiB | ||||
| subtask2 | 0/20 | ||||||
| 3 | Accepted | 16ms | 3124 KiB | ||||
| 4 | Runtime error | 16ms | 3124 KiB | ||||
| subtask3 | 0/40 | ||||||
| 5 | Accepted | 16ms | 3124 KiB | ||||
| 6 | Runtime error | 14ms | 3124 KiB | ||||
| 7 | Runtime error | 16ms | 3108 KiB | ||||
| 8 | Runtime error | 16ms | 3108 KiB | ||||
| 9 | Runtime error | 16ms | 2908 KiB | ||||
| 10 | Runtime error | 14ms | 3020 KiB | ||||
| 11 | Runtime error | 17ms | 3036 KiB | ||||
| 12 | Runtime error | 16ms | 3104 KiB | ||||
| 13 | Runtime error | 16ms | 3112 KiB | ||||
| 14 | Runtime error | 16ms | 3140 KiB | ||||
| subtask4 | 0/40 | ||||||
| 15 | Accepted | 393ms | 21304 KiB | ||||
| 16 | Runtime error | 546ms | 21436 KiB | ||||
| 17 | Runtime error | 586ms | 21172 KiB | ||||
| 18 | Runtime error | 546ms | 21176 KiB | ||||
| 19 | Runtime error | 574ms | 21436 KiB | ||||
| 20 | Runtime error | 540ms | 21176 KiB | ||||
| 21 | Runtime error | 542ms | 21432 KiB | ||||
| 22 | Runtime error | 574ms | 21272 KiB | ||||
| 23 | Runtime error | 444ms | 17372 KiB | ||||
| 24 | Runtime error | 432ms | 17508 KiB | ||||
| 25 | Runtime error | 458ms | 17356 KiB | ||||
| 26 | Runtime error | 467ms | 17376 KiB | ||||
| 27 | Accepted | 384ms | 21176 KiB | ||||