TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
s = input().strip()
t = input().strip()
for i in range(n):
  if s[i:] == t[:n-i]:
    print(s + t[i:])
print(s+t)

n = int(input())
s = input().strip()
t = input().strip()
for i in range(n-1):
  if s[i:] == t[:n-i+1]:
    print(s + t[i+1:])
print(s+t)


n = int(input())
s = input().strip()
t = input().strip()
for i in range(n-1):
  if s[i:] == t[:n-i+1]:
    print(s + t[i:])
print(s+t)


n = int(input())
s = input()
t = input()
for i in range(n):
    if s[i:] == t[:n-i]:
        print(n + i)
        break
else:
    print(2 * n)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
s = input().strip()
t = input().strip()
is_match = False
for i in range(len(s)):
  if s[i:] == t[:n-i]:
    is_match = True
    break
if is_match:
  print(s[:i] + t)
else:
  print(s + t)

n = int(input())
s = input().strip()
t = input().strip()
is_match = False
for i in range(len(s)):
  if s[i:] == t[:n-i]:
    is_match = True
    break
if is_match:
  print(len(s[:i] + t))
else:
  print(len(s + t))


Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
#!/usr/bin/env python
# coding: utf-8

# In[27]:


N = int(input())
s = str(input())
t = str(input())


# In[29]:


for i in range(len(s)):
#     print(i, s[i:], t[:len(t)-i])
    if s[i:] == t[:len(t)-i]:
        print(s[:i]+t)
        break
    elif i == len(s)-1:
        print(s+t)


# In[ ]:






#!/usr/bin/env python
# coding: utf-8

# In[39]:


N = int(input())
s = str(input())
t = str(input())


# In[40]:


for i in range(len(s)):
#     print(i, s[i:], t[:len(t)-i])
    if s[i:] == t[:len(t)-i]:
#         print(s[:i]+t)
        print(i+N)
        break
    elif i == len(s)-1:
#         print(s+t)
        print(2*N)


# In[ ]:






Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
s = input()
t = input()

if s == t:
  print(n)
  exit()

ans = ''
for i in range(n):
  ss = s[n-i-1:]
  tt = t[:i+1]
  if ss == tt:
    ans = s[:n-i-1]+t[i+1:]

if len(ans) == 0:
  print(len(s+t))
else:
  print(len(ans))
  

n = int(input())
s = input()
t = input()

if s == t:
  print(n)
  exit()

ans = ''
for i in range(n):
  ss = s[n-i-1:]
  tt = t[:i+1]
  if ss == tt:
    ans = s[:n-i-1]+ss+t[i+1:]
if len(ans) == 0:
  print(len(s+t))
else:
  print(len(ans))
  

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
def inpl():
    return list(map(int, input().split()))


N = int(input())
S = input()
T = input()

for i in range(N):
    if T[i] == S[-1 - i]:
        continue
    print(2 * N - i * 2)
    break


def inpl():
    return list(map(int, input().split()))


def Check(S, T):
    for i in range(len(S)):
        if S[i] != T[i]:
            return False
    return True


N = int(input())
S = input()
T = input()

for i in range(N):
    if Check(S[i:], T) is True:
        print(N + i)
        break
else:
    print(2 * N)


Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
a,b,c=(input() for _ in range(3))
cnt=0
for i in range(1,int(a)+1):
    if(b[-i:]==c[:i]):cnt=i
    else:print(2*int(a)-cnt)

a,b,c=(input() for _ in range(3))
cnt=0
for i in range(1,int(a)+1):
    if(b[-i:]==c[:i]):cnt=i
print(2*int(a)-cnt)


Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n,x = map(int, input().split())
if n != x:
  print("No")
else:
  print("Yes")
  for i in range(1, 2 * n):
    print(i)


n = int(input())
a = input()
b = input()

for i in range(n):
  if i == 0:
    if a == b:
      print(a)
      exit()
  if a[i:] == b[:-i]:
    print(a + b[-i:])
    exit()
print(a+b)

n = int(input())
a = input()
b = input()

for i in range(n):
  if i == 1:
    if a == b:
      print(a)
      exit()
  if a[i:] == b[:-i]:
    print(a + b[-i:])
    exit()
print(a+b)

n = int(input())
a = input()
b = input()

for i in range(n):
  if i == 0:
    if a == b:
      print(n)
      exit()
  if a[i:] == b[:-i]:
    print(n+i)
    exit()
print(n*2)


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
N = int(input())
s = input()
t = input()
index = 0
for i in s:
    if i == t[index]:
        index += 1
    else:
        continue
print(s + t[index:])

N = int(input())
s = input()
t = input()
index = 0
for i in s:
    if i == t[index]:
        index += 1
    else:
        continue
print(len(s + t[index:]))

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
# from math import factorial,sqrt,ceil,gcd
# from itertools import permutations as permus
# from collections import deque,Counter
# import re

# from decimal import Decimal, getcontext

# # eps = Decimal(10) ** (-100)

# import numpy as np
# import networkx as nx
# from scipy.sparse.csgraph import shortest_path, dijkstra, floyd_warshall, bellman_ford, johnson
# from scipy.sparse import csr_matrix
# from scipy.special import comb


N = int(input())
S = input()
T = input()
ans = 2*N
for i in range(N,-1,-1):
    # ST = S[:i] + T
    print(ST,ST[:i],ST[i:])
    if ST[:N]==S and ST[-N:]==T:
        ans = min(len(ST),ans)

print(ans)

# for row in board:

# print("{:.10f}".format(ans))
# print("{:0=10d}".format(ans))


# from math import factorial,sqrt,ceil,gcd
# from itertools import permutations as permus
# from collections import deque,Counter
# import re

# from decimal import Decimal, getcontext

# # eps = Decimal(10) ** (-100)

# import numpy as np
# import networkx as nx
# from scipy.sparse.csgraph import shortest_path, dijkstra, floyd_warshall, bellman_ford, johnson
# from scipy.sparse import csr_matrix
# from scipy.special import comb


N = int(input())
S = input()
T = input()
ans = 2*N
for i in range(N,-1,-1):
    ST = S[:i] + T
    # print(ST,ST[:i],ST[i:])
    if ST[:N]==S and ST[-N:]==T:
        ans = min(len(ST),ans)

print(ans)

# for row in board:

# print("{:.10f}".format(ans))
# print("{:0=10d}".format(ans))


Verdicts: Runtime Error

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
s = input()
t = input()

cnt = 0
for i, j in zip(s[::-1], t):
    if i == j:
        cnt += 1

cnt2 = 0
for i, j in zip(s, t):
    if i == j:
        cnt2 += 1
print(s+t[max(cnt, cnt2):])

n = int(input())
s = input()
t = input()

res = s+t
for num in range(n):
    tmp = s[:-num]+t
    if len(tmp) < n:
        break
    if tmp[:n] == s and tmp[-n:] == t:
        res = tmp
print(res)


n = int(input())
s = input()
t = input()

res = s+t
for num in reversed(range(n)):
    tmp = s[:num]+t
    if tmp[:n] == s and tmp[-n:] == t:
        res = tmp
print(len(res))


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
N = int(input())
s = input()
t = input()

answer = ["*"]*N

for i in range(len(s)):
    answer[i] = s[i]

for j in range(len(t)):
    answer[N-j-1] = t[i]

print(len(answer))

N = int(input())
s = input()
t = input()


nomatch = False
place = 0
for i in range(N):
    place = i
    if t[0] == s[i]:      
        match = True
        for j in range(N-i):
            if t[j] != s[i+j]:
                match = False
        if match:
            break
        else:
            continue
    elif i == N-1:
        nomatch = True

if nomatch:
    print(2*N)
else:
    print(N+place)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n=int(input())
s=input()
t=input()

print(len(set(s)-set(t))+len(set(t)-set(s)))


n=int(input())
s=input()
t=input()

for i in range(n,2*n-1):
    if s[:2*n-i] == t[2*n-i]:
        print(i)
        exit()
print(2*n)

n=int(input())
s=input()
t=input()

for i in range(n+1):
    #print(s[i:],t[:n-i])
    if s[i:] == t[:n-i]:
        print(n+i)
        exit()

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
s = input()
t = input()
for i in range(n):
    l = n - i
    if s[i:] == t[i:i+l]:
        print(2*n-l)
        exit()
print(2*n)


n = int(input())
s = input()
t = input()
for i in range(n):
    l = n - i
    if s[i:] == t[0:l]:
        print(2*n-l)
        exit()
print(2*n)


Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
import sys

N = int(input())

a = input()
b = input()

for i in range(N):
	if(a[0:N-i] == b[i:N]){
		print(N+i)
		sys.exit()
		
print(2 * N)

import sys

N = int(input())

a = input()
b = input()

for i in range(N):
	if a[i:N] == b[0:N-i]:
		print(N+i)
		sys.exit()
		
print(2 * N)

Verdicts: Runtime Error

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())

s = [i for i in input()]
t = [i for i in input()]

s.extend(t)

print(''.join(sorted(set(s), key=s.index)))



n = int(input())
s = input()
t = input()

idx = 0
ct = 0

for i in s:
    if i == t[idx]:
        ct += 1
        idx += 1
        
print(n*2 - ct)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
N = int(input())
s = str(input())
t = str(input())

word = s + t

for i in range(N):
    if word[len(s) - 1] == word[len(s)] and :
        s = s[:N - 1]
        word = s + t
    
print(len(word))
    


N = int(input())
s = str(input())
t = str(input())

word = s + t

if s == t:
  print(N)

for letter in s:
  if letter not in letter_list:
    letter_list.append(letter)
    
for letter in t:
  if letter not in list(letter_dict.keys()):
    letter_dict[letter] = 1
    
print(len(letter_dict))

import sys
N = int(input())
s = str(input())
t = str(input())

word = s + t

for letter in s:
  if letter not in letter_list:
    letter_list.append(letter)
    
for letter in t:
  if letter not in list(letter_dict.keys()):
    letter_dict[letter] = 1
    
if s == t:
  print(N)
  sys.exit()
else:
  print(len(letter_dict))

import sys
N = int(input())
s = str(input())
t = str(input())

word = s + t

if s == t:
  print(N)
  sys.exit()

for letter in s:
  if letter not in letter_list:
    letter_list.append(letter)
    
for letter in t:
  if letter not in list(letter_dict.keys()):
    letter_dict[letter] = 1
    
print(len(letter_dict))

import sys
N = int(input())
s = str(input())
t = str(input())

word = s + t

while s[:-1] == word[0] and len(s) + len(t) > N:
        tmp = s[-1]
        s = s[:(len(s)) - 1]
        t = t[1:]
        word = s + tmp + t

print(len(word))
    


import sys
N = int(input())
s = str(input())
t = str(input())

answer = 2 * N
for i in range(N, 2 * N + 1):
    if s[len(s) - (2 * N - i):] == t[:2 * N - i]:
        answer = i
        break
    
print(answer)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
s = input()
t = input()

lst = []
for i in range(1,n+1):
    print(s[n-i:],t[:i])
    if s[n-i:] == t[:i]:
       lst.append(i+(n-i)*2)


if lst:
    print(min(lst))
else:
    print(n*2)



n = int(input())
s = input()
t = input()

lst = []
for i in range(1,n+1):
    if s[n-i:] == t[:i]:
       lst.append(i+(n-i)*2)

if lst:
    print(min(lst))
else:
    print(n*2)



Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n=int(input())
s=input()
t=input()
for i in range(n,2*n+1):
  a=s[:i]+t[i-n:]
  if a[-n:]==t:exit(print(i))

n=int(input())
s=input()
t=input()
for i in range(n,2*n+1):
  a=s[:n]+t[2*n-i:]
  if a[-n:]==t:exit(print(i))

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):


n = int(input())
s = input()
t = input()

comb = s+t
comb = list(comb)

if s==t:
    print(s)
else:

    while (True):
        left = n-1
        right = n
        if comb[left] == comb[right]:
            comb[left]=""
            left-=1
            right+=1
        else:
            break

    print("".join(comb))






n = int(input())
s = input()
t = input()

s = list(s)
t = list(t)

s.reverse()

a1 = []
a2 = []

c1 = ""
c2 = ""

for i in range(n):
    c1 += s[i]
    c2 += t[i]
    temp = c1
    a1.append(temp[::-1])
    a2.append(c2)

max = 0
for i in range(n):
    if a1[i] == a2[i]:
        max = i+1
#
# print(a1)
# print(a2)

print(2*n-max)





Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
s = str(input())
t = str(input())
z = s + t
for i in range(n):
    if s[i:] == t[:n-i]:
        z = s + t[n-i:]
        break
print(z)

n = int(input())
s = str(input())
t = str(input())
z = s + t
for i in range(n):
    if s[i:] == t[:n-i]:
        z = s + t[n-i:]
        break
print(len(z))

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
N,S,T=(input() for i in range(3))
N=int(N)
for k in range(N,-1,-1):
    if all([S[N-k+i]==T[i] for i in range(k)]) or k==0:
        print(S+T[k:])
        break

N,S,T=(input() for i in range(3))
N=int(N)
for k in range(N,-1,-1):
    if all([S[N-k+i]==T[i] for i in range(k)]) or k==0:
        print(N*2-k)
        break

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
s = str(input())
t = str(input())
i = 0
while t.find(s[i,n])>-1:



n = int(input())
s = str(input())
t = str(input())
i = -1
while True:
   i += 1
   if t.find(s[i:n])>-1:
      print(int(n+i))
      break


Verdicts: Runtime Error

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
s = input()
t = input()

ans = 2*n

for i in range(1,n+1):
    print(s[-i:], t[:i])
    if s[-i:] == t[:i]:
        ans = 2*n - i
print(ans)

n = int(input())
s = input()
t = input()

ans = 2*n

for i in range(1,n+1):
    if s[-i:] == t[:i]:
        ans = 2*n - i
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
s = input()
t = input()
for i in range(n, 0, -1):
    if s[-i:] == t[:i]:
        ans = 2 * n - i
        print(ans)
        break
print(2 * n)


n = int(input())
s = input()
t = input()
for i in range(n, 0, -1):
    if s[-i:] == t[:i]:
        ans = 2 * n - i
        print(ans)
        break
else:
    print(2 * n)


Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
def main():
    N = int(input())
    s = input()
    t = input()

    for i in range(N):
        if s[i:] == t[:N-i]:
            print(s[:i]+t)
            return
    print(s+t)

main()

def main():
    N = int(input())
    s = input()
    t = input()

    for i in range(N):
        if s[i:] == t[:N-i]:
            print(s[:i]+t)
            return
    print(s+t)

main()

def main():
    N = int(input())
    s = input()
    t = input()

    for i in range(N):
        if s[i:] == t[:N-i]:
            print(2*N-(N-i))
            return
    print(N*2)

main()

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
N = int(input())
s = input()
t = input()

n = N
while 0 <= n:
    a = s[-(n+1):]
    b = t[0:n+1]
    if a == b:
        print(s+t[n+1:])
        exit()
    n -= 1

print(s+t)
exit()

N = int(input())
s = input()
t = input()

n = N
while 0 <= n:
    a = s[-(n+1):]
    b = t[0:n+1]
    if a == b:
        print(len(s+t[n+1:]))
        exit()
    n -= 1

print(len(s+t))
exit()

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n=int(input())
s=input()
t=input()
for i in range(n):
  if s[i:-1] == t[:n-i]:
    print(n+i)
    quit(0)
    
print(2*n)

n=int(input())
s=input()
t=input()
for i in range(n):
  if s[i:] == t[:n-i]:
    print(n+i)
    quit(0)
    
print(2*n)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
s = input()
t = input()
cnt = 0
for i in range(n):
    print(s[i:])
    print(t[:n-i])
    if s[i:] == t[:n-i]:
        cnt += n - i
        break
print(2 * n - cnt)

n = int(input())
s = input()
t = input()
cnt = 0
for i in range(n):
    if s[i:] == t[:n-i]:
        cnt += n - i
        break
print(2 * n - cnt)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
s = input()
t = input()
cou = 0
for i in range(n):
  s1 = s[i:]
  t1 = t[:n-i]
#  print(s1,t1)
  if s1==t1:
    print(2*n-(n-i))
else:
  print(2*n)


n = int(input())
s = input()
t = input()
cou = 0
for i in range(n):
  s1 = s[i:]
  t1 = t[:n-i]
#  print(s1,t1)
  if s1==t1:
    print(2*n-(n-i))
    exit()
else:
  print(2*n)


Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n=int(input())
s=str(input())
t=str(input())

def solve(n,s,t):
  for i in range(n):
    print(s[i:])
    print(t[:n-i])
    if s[i:]==t[:n-i]:
      return 2*n-(n-i)
  return 2*n

print(solve(n,s,t))

n=int(input())
s=str(input())
t=str(input())

def solve(n,s,t):
  for i in range(n):
    if s[i:]==t[:n-i]:
      return 2*n-(n-i)
  return 2*n

print(solve(n,s,t))

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):

def resolve():
    n = int(input())
    s = input()
    t = input()
    if s == t and len(s) >= n:
        print(len(s))
        return
    pos = 0
    for ss, tt in zip(s[::-1], t):
        if ss != tt:
            break
        pos += 1
    if len(s) + len(t[pos:]) >= n:
        print(len(s+t[pos:]))
        print(pos)
        return
    print(len(s+t))


if __name__ == "__main__":
    resolve()



def resolve():
    n = int(input())
    s = input()
    t = input()
    ans = len(s) + len(t)
    for i in range(len(s)):
        pos = 0
        for ss,tt in zip(s[i:],t):
            if ss != tt:
                break
            pos += 1
        else:
            if len(s) - i > len(t) or i + len(t) < n:
                continue
            tmp = i + len(t)
            if tmp < ans:
                ans = tmp
    print(ans)
        

if __name__ == "__main__":
    resolve()


Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
# -*- coding: utf-8 -*-
n = int(input())
s = input()
t = input()
txt = s+t
tmp = ''

for i in range(1,n):
    tmp = s+t[i:]
    if tmp[-n:]==t:
        txt = tmp

if s==t:
    print(s)
else :
    print(txt)

# -*- coding: utf-8 -*-
n = int(input())
s = input()
t = input()
txt = s+t
tmp = ''

for i in range(1,n):
    tmp = s+t[i:]
    if tmp[-n:]==t:
        txt = tmp

if s==t:
    print(len(s))
else :
    print(len(txt))

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
N = int(input())
s = str(input())
t = str(input())

if s == t:
    print(N)
else:
    for i in range(N):
        if s[N-1-i]!=t[i]:
            print(2*N-(i+1))
            break

N = int(input())
s = str(input())
t = str(input())

if s == t:
    print(N)
else:
    for i in range(N,0,-1):
        #print(s[N-i:],t[0:i],)
        if s[N-i:]==t[0:i]:
            print(2*N-i)
            break
    else:
        print(2*N)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
s = input()
t = input()

s = list(s)
t = list(t)

for i in range(-1, -n, -1):
    if t[i] != s[i]:
        s.append(t[i])

print(s)
print(len(s))

n = int(input())
s = input()
t = input()

ans = n
for i in range(n):
    if s[i:] == t[:n-i]:
        break
    else:
        ans += 1
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
N = int(input())
S = input()
T = input()
ans = 2 * N
if (S == T):
    print(N)
    exit(0)
for i in range(N):
    if (T[i] == S[-(i + 1)]):
        print(T[i], S[-(i + 1)])
        ans -= 1
print(ans)

N = int(input())
S = input()
T = input()
ans = 2 * N
for i in range(N):
    for j in range(1, N + 1):
        if (S[i:] == T[:j]):
            ans = min(ans, 2 * N - j)
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
s = input()
t = input()

if s == t:
    print(n)
    return

r = 0
for i in range(0, n):
    if s[-(i + 1)] != t[i]:
        break
    r += 1

print((n * 2) - r)


n = int(input())
s = input()
t = input()

r = n
for i in range(0, n):
    if s[i:] == t[:(n-i)]:
            break
    r += 1

print(r)


Verdicts: Runtime Error

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n=int(input())
s=input()
t=input()
while True:
  if s==t:
    break
  s=s[1:]
  t=[:-1]
  n+=1
print(n)

n=int(input())
s=input()
t=input()
while True:
  if s==t:
    break
  s=s[1:]
  t=t[:-1]
  n+=1
print(n)


Verdicts: Runtime Error

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
N = int(input())
s = input()
t = input()
for i in range(N+1):
    if s[i:]==t[:N-i]:
        break
print(s+t[N-i:])

N,s,t = open(0).read().split()
N = int(N)
ans = 2*N
for i in range(N):
    if s[i:]==t[:N-i]:
        ans=N+i
        break
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
s = input()
t = input()
ans = s + t[len(s+t) - len(set(s+t)):]
print(ans)

n = int(input())
s = input()
t = input()
for i in range(n):
    if s[i:] == t[:n-i]:
        print(n+i)
        exit()
print(n*2)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n,s,t=open(0).readlines()
n=int(n)
for i in range(1,n+1):
  x=s[:i]+t
  if x[:n]==s and x[-n:]==t:
    q=x
print(len(x))

_,s,t=open(0).readlines();print(len(s+t)-sum(r[0]==r[1]for r in zip(s,t))-1)

input();s=input();t=input();print(2*len(s)-max([i for i in range(n+1)if s[-i:]==t[:i]]or[0]))

n=int(input())
s=input()[::-1]
t=input()
l=0
for i,j in zip(s,t):
    if i==j:
        l+=1
    else:
        break
print(s[::-1]+t[l:])

n=int(input());s=input();t=input();print(2*n-max([i for i in range(n+1)if s[-i:]==t[:i]]or[0]))

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n=int(input())
s=[input() for i in range(n)]
t=[input() for j in range(n)]
s.reverse()
l=0
for k  in range(n):
    while s[k]==t[k]:
        l+=1
print(l)

n=int(input())
s=list(input())
t=list(input())
s.reverse()
l=0
for k  in range(n):
    if s[k]==t[k]:
        l+=1
    else:
        break
print(l)

N = int(input())
s = input()
t = input()
ans = 2*N
for i in range(N):
    if s[i:] == t[:N-i]:
        ans -= N - i
        break
print(ans)


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
s = input()
t = input()

for i in range(n):
	if t[i] == s[(-1) * i - 1]:
		continue
	else:
		break

if i == 0:
	print(s + t)
else:
	print(s[:(-1) * i] + t)

n = int(input())
s = input()
t = input()

for i in reversed(range(n)):
	j = (-1) * i - 1
	if t[:(i+1)] == s[j:]:
		break
	else:
		continue

if i == 0:
	print(len(s + t))
else:
	print(len(s[:j] + t))

n = int(input())
s = input()
t = input()

flag = 0

for i in reversed(range(n)):
	j = (-1) * i - 1
	if t[:(i+1)] == s[j:]:
		flag = 1
		break
	else:
		continue

if i == 0 and flag == 0:
	print(len(s + t))
else:
	print(len(s[:j] + t))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
N=int(input())
S=input()
T=input()
for i in range(N+1):
  s = S+T[::-1][i:][::-1]
  if s[-N:]==T: print(N+i);break

N=int(input())
S=input()
T=input()
for i in range(N+1):
  s = S+T[::-1][:i][::-1]
  if s[-N:]==T:print(N+i);break


Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
s = input()
t = input()

if s==t:
  print(s)
  
else:
  for i in range(n):
    if s[i:] == t[:-i]:
      print(2*n -(n-i))
    else:
      print(2*n)

n =int(input())
s = list(input())
t =list(input())

for i in range(n,0,-1):
  if s[-i:] ==t[:i]:
    print(2*n-i)
    exit()
print(2*n)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n=int(input())
s=input()
t=input()

n_s=len(s)
n_t=len(t)
l=[]
for i in range(n_s):
    for j in range(n_t):
        l.append(s[:i]+t[j:])
ans=s+t
for c in l:
    if c[:n_s]==s and c[len(c)-n_t:]==t:
        if len(ans)>len(c):
            ans=c

print(ans)

n=int(input())
s=input()
t=input()

n_s=len(s)
n_t=len(t)
l=[]
for i in range(n_s):
    for j in range(n_t):
        l.append(s[:i]+t[j:])
ans=s+t
for c in l:
    if c[:n_s]==s and c[len(c)-n_t:]==t:
        if len(ans)>len(c):
            ans=c

print(len(ans))

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
#26 A - Prefix and Suffix
N = int(input())
s = list(input())
t = list(input())
s_rev = list(reversed(s))

cnt = N
for i in range(1,N+1):
    
    tgt = list(reversed(s_rev[:i]))
    print(tgt,t[:i])
    if tgt == t[:i]:
        cnt -= 1
    else:
        break
    
if s == t:
    print(N)
else:
    ans = s[:cnt] + t
    print(len(ans))

#26 A - Prefix and Suffix
N = int(input())
s = list(input())
t = list(input())
s_rev = list(reversed(s))

cnt = 0
for i in range(1,N+1):
    
    tgt = list(reversed(s_rev[:i]))
    if tgt == t[:i]:
        cnt = len(tgt)
    
ans = s + t[cnt:]
print(len(ans))

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
# -*- coding: utf-8 -*-
"""
Created on Sat Oct 29 21:00:35 2016

@author: dotha
"""

def main():
    N = int(input())
    s = input()
    t = input()
    if s==t:
        return s
    for i in range(N):
        if s[i:] == t[:-i]:
            return(s[:i]+t)
    else:
        return(s+t)
    





if __name__ == "__main__":
    print(main())

# -*- coding: utf-8 -*-
"""
Created on Sat Oct 29 21:00:35 2016

@author: dotha
"""

def main():
    N = int(input())
    s = input()
    t = input()
    if s==t:
        return s
    for i in range(N):
        if s[i:] == t[:-i]:
            return(s[:i]+t)
    else:
        return(s+t)
    





if __name__ == "__main__":
    print(len(main()))

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
N = int(input())
s = input()
t = input()

if s.find(t) > -1:
    print(len(s))
    exit()

S = s + t
r = len(S)
for i in range(N):
    ti = S[-(N-i):]
    index = s.find(ti)
    if index > -1:
        print(len(s)+len(t)- (len(s)-index-1))
        exit()
print(r)

N = int(input())
s = input()
t = input()

S = s + t
r = len(S)
for i in range(N):
    ti = t[:(N-i)]
    index = s.find(ti)
    if index > -1:
        print(len(s)+len(t) - (len(s)-index))
        exit()
print(r)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
N=int(input())
s=list(input())
t=list(input())
f=s+t
if s==t:
    print(''.join(s))
    exit()
for i in range(0,N):
    if s[-i:]==t[:i]:
        f=s+t[i:]
print(''.join(f))

N=int(input())
s=list(input())
t=list(input())
f=s+t
if s==t:
    print(s)
    exit()
for i in range(0,N):
    if s[-i:]==t[:i]:
        f=s+t[i:]
print(f)

N=int(input())
s=list(input())
t=list(input())
f=s+t
if s==t:
    print(len(s))
    exit()
for i in range(0,N):
    if s[-i:]==t[:i]:
        f=s+t[i:]
print(len(f))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
s = input()
t = input()
ans = ""
for i in range(n):
    if s[i] == t[0]:
        ans += s[:i]
        ans += t
        break
if ans == "": ans = s + t
print(ans)

n = int(input())
s = input()
t = input()
if s == t: print(s)
else:
    idx = j = 0
    for i in range(n):
        if s[i] == t[j]:
            if j == 0: idx = i
            j += 1
        else:
            idx = 0
            j = 0
    if idx == 0: print(s + t)
    else: print(s[:idx] + t)

n = int(input())
s = input()
t = input()
ans = n * 2
for i in range(n):
    if s[i:] == t[:n-i]:
        ans -= n - i
        break
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
N = int(input())
s = input()
t = input()

for i in range(N):
    if s==t:
        print(N)
        break
    elif s[i:] == t[:-i]:
        print(N+i)
        break
    else:
        print(N*2)
        break


N = int(input())
s = input()
t = input()

ans=0
for i in range(N):
    if s==t:
        ans=N
        break
    elif s[i:] == t[:-i]:
        ans=N+i
        break
if ans!=0:
    print(ans)
else:
    print(N*2)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
a, b = [input() for i in range(2)]
for i in range(n+1):
  if a[i:] == b[:n-i]:
    print(i + n)


n = int(input())
a, b = [input() for i in range(2)]
for i in range(n+1):
  if a[i:] == b[:n-i]:
    print(i + n)
    break

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
N = int(input())
s = input()
t = input()
ans = ''
for i in range(N):
    prefix = s[i:]
    if t.startswith(prefix):
        ans = s[:i] + t
        break
if ans == '':
    ans = s + t
print(ans)


N = int(input())
s = input()
t = input()
ans = ''
for i in range(N):
    prefix = s[i:]
    if t.startswith(prefix):
        ans = s[:i] + t
        break
if ans == '':
    ans = s + t
print(len(ans))


Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n=int(input())
s=input()
t=list(input())

import re 


ans=s

k=-1
for i in range(n):
    tmp=''.join(t[:i+1])

    if tmp in ans:
        k=i

if k<n-1:
    ans+=''.join(t[k+1:])

print(ans)


n=int(input())
s=input()
t=list(input())

import re 


ans=s

k=-1
for i in range(n):
    tmp=''.join(t[:i+1])

    if tmp in ans:
        k=i

if k<n-1:
    ans+=''.join(t[k+1:])

print(len(ans))


Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
N = int(input())
s = input()
t = input()

for i in range(N):
    if s[i:] == t[:N - i]:
        tmp = len(s[i:])
        print(s + t[tmp:])
        exit()

print(s + t)

N = int(input())
s = input()
t = input()

for i in range(N):
    if s[i:] == t[:N - i]:
        tmp = len(s[i:])
        print(len(s + t[tmp:]))
        exit()

print(len(s + t))

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
N = int(input())
S = input()
T = input()
ans = S+T
for i in range(1,N+1):
    #print(S[-i:],T[:i])
    if S[-i:] == T[:i]:
        ans = S + T[i:]
print(ans)

N = int(input())
S = input()
T = input()
ans = S+T
for i in range(1,N+1):
    #print(S[-i:],T[:i])
    if S[-i:] == T[:i]:
        ans = S + T[i:]
print(len(ans))

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
N = input()
N =int(N)
s = input()
t = input()

for i in range(N):
    q = s[-(i+1):]
    r = t[:i+1]
    if q == r :
        x = q
        y =i+1
print(s[:N-y]+t)

N = input()
N =int(N)
s = input()
t = input()
y = 0
for i in range(N):
    q = s[-(i+1):]
    r = t[:i+1]
    if q == r :
        x = q
        y =i+1
print(N*2-y)

Verdicts: Runtime Error

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n=int(input())
s=input()
t=input()
ans=""
for i in range(n+1):
    s1=s[:n-i]
    s2=s[n-i:]
    t1=t[:i]
    t2=t[i:]
    if s2==t1:
        ans=s1+s2+t2
print(ans)


n=int(input())
s=input()
t=input()
ans=""
for i in range(n+1):
    s1=s[:n-i]
    s2=s[n-i:]
    t1=t[:i]
    t2=t[i:]
    if s2==t1:
        ans=s1+s2+t2
print(len(ans))


Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
w1 = input()
w2 = input()

def joint(x,y):
    tmp = 0
    for i in range(0,n):
        if x[-i-1] == y[i]:
            tmp += 1
        else:
            break
    tmp_x = x[0:n-tmp]
    return(tmp_x+y)

if w1 == w2:
    print(w1)
else:
    print(joint(w1,w2))

n = int(input())
w1 = input()
w2 = input()

def joint(x,y):
    tmp = n
    tmp_x = x
    tmp_y = y
    while tmp_x != tmp_y:
        tmp_x = tmp_x[1:]
        tmp_y =  tmp_y[0:-1]
        tmp -= 1
    joi_x = x[0:n-tmp]
    return(joi_x+y)

print(len(joint(w1,w2)))

Verdicts: Wrong Answer

Accepted
Problem: Snuke is interested in strings that satisfy the following conditions:    * The length of the string is at least N.   * The first N characters equal to the string s.   * The last N characters equal to the string t.  Find the length of the shortest string that satisfies the conditions.

Submission attempts (in order):
n = int(input())
s = input()
t = input()
temp = s
for i in range(n):
    if temp[:n] == s and temp[-n:] == t:
        print(len(temp))
        break
    if s[-(i + 1)] != t[i]:
        temp += t[i]
        print(temp)
        print(temp[:n])
        print(temp[-n:])
    if temp[:n] == s and temp[-n:] == t:
        print(len(temp))
        break  

n = int(input())
s = input()
t = input()
duplicates = 0
for i in range(n):
    if s[-(i + 1):] == t[:i + 1]:
        duplicates = i + 1
temp = s + t[duplicates:]
print(len(temp)) 

Verdicts: Wrong Answer

Accepted