ZhenlongDai/ACPR huggingface dataset:
Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(input().replace(', ', ' '))


Failing test case input:
gbtku,ajcoeer.sasks

Expected output:
gbtku ajcoeer.sasks


Actual output:
gbtku,ajcoeer.sasks


Fixed submission (verdict: Accepted):
print(input().replace(',', ' '))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
s.replace(',',' ')
print(s) 

Failing test case input:
aagee,a+hjhgfcdecbf

Expected output:
aagee a+hjhgfcdecbf


Actual output:
aagee,a+hjhgfcdecbf


Fixed submission (verdict: Accepted):
s=input()
t=s.replace(',',' ')
print(t)

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input('')
print(s.replace('',','))

Failing test case input:
rxi+e+ozehwdzpncpma

Expected output:
rxi+e+ozehwdzpncpma


Actual output:
,r,x,i,+,e,+,o,z,e,h,w,d,z,p,n,c,p,m,a,


Fixed submission (verdict: Accepted):
s = input()
print(s.replace(',',' '))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(input().replace(",", ""))

Failing test case input:
ebbedcfghjh+a,eeg`a

Expected output:
ebbedcfghjh+a eeg`a


Actual output:
ebbedcfghjh+aeeg`a


Fixed submission (verdict: Accepted):
print(input().replace(",", " "))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
print(s.replace(",","/"))


Failing test case input:
fbbedcfghjh+a,eeg`a

Expected output:
fbbedcfghjh+a eeg`a


Actual output:
fbbedcfghjh+a/eeg`a


Fixed submission (verdict: Accepted):
s=input()
print(s.replace(","," "))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
S.replace(',', ' ')
print(S)

Failing test case input:
akcus/fskesps,aktbf

Expected output:
akcus/fskesps aktbf


Actual output:
akcus/fskesps,aktbf


Fixed submission (verdict: Accepted):
print(input().replace(',', ' '))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = [str(i) for i in input().split(",")]
print(s)
print(' '.join(map(str, s)))

Failing test case input:
aagee,a+hjhgfceecbf

Expected output:
aagee a+hjhgfceecbf


Actual output:
['aagee', 'a+hjhgfceecbf']
aagee a+hjhgfceecbf


Fixed submission (verdict: Accepted):
s = [str(i) for i in input().split(",")]

print(' '.join(map(str, s)))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()

print(s.replace(',',''))


Failing test case input:
akcur/fskdspr,aktbf

Expected output:
akcur/fskdspr aktbf


Actual output:
akcur/fskdspraktbf


Fixed submission (verdict: Accepted):
s = input()

print(s.replace(',',' '))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
print(s)
s2 = " ".join(s.split(","))
print(s2)

Failing test case input:
hap,ypnewzear,enjoy

Expected output:
hap ypnewzear enjoy


Actual output:
hap,ypnewzear,enjoy
hap ypnewzear enjoy


Fixed submission (verdict: Accepted):
s = input()
s2 = " ".join(s.split(","))
print(s2)
Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
s.replace(',',' ')

Failing test case input:
aagee,a+hjhgfceecbf

Expected output:
aagee a+hjhgfceecbf


Actual output:

Fixed submission (verdict: Accepted):
s = input()
p = s.replace(',',' ')
print(p)

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input('')
print(s.replace(',',''))

Failing test case input:
akcus/fslesps,aktbf

Expected output:
akcus/fslesps aktbf


Actual output:
akcus/fslespsaktbf


Fixed submission (verdict: Accepted):
s = input()
print(s.replace(',',' '))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = input().split(",")
x=str(x)

print(x.replace(","," "))

Failing test case input:
azo,mpndwhecr+eziyo

Expected output:
azo mpndwhecr+eziyo


Actual output:
azo, mpndwhecr+eziyo

Fixed submission (verdict: Accepted):
x = input()
x=x.replace(","," ")
print(x)

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = [i for i in input().split(',')]
print(''.join(S))

Failing test case input:
akcur/fskdsps,aktbf

Expected output:
akcur/fskdsps aktbf


Actual output:
akcur/fskdspsaktbf


Fixed submission (verdict: Accepted):
S = [i for i in input().split(',')]
print(' '.join(S))

Problem: p03834
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
for s in input().split():
  print(s,end=' ')

Failing test case input:
ahp,mpndwzecr+eziyo

Expected output:
ahp mpndwzecr+eziyo


Actual output:
ahp,mpndwzecr+eziyo 

Fixed submission (verdict: Accepted):
for s in input().split(','):
  print(s,end=' ')

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
s.replace(',',' ')
print(s)

Failing test case input:
ahp,ypnewzebr,emjoy

Expected output:
ahp ypnewzebr emjoy


Actual output:
ahp,ypnewzebr,emjoy


Fixed submission (verdict: Accepted):
s=input()
a=s.replace(',',' ')
print(a)

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(input().replace(" ",","))

Failing test case input:
oyi,e+pzehwdnpmcoza

Expected output:
oyi e+pzehwdnpmcoza


Actual output:
oyi,e+pzehwdnpmcoza


Fixed submission (verdict: Accepted):
print(input().replace(","," "))

Problem: p03834
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s=input()
print(s.split(","))

Failing test case input:
aagee,a+hjhgfcdecbf

Expected output:
aagee a+hjhgfcdecbf


Actual output:
aagee, a+hjhgfcdecbf

Fixed submission (verdict: Accepted):
s=input()
print(s.replace(","," "))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input().split(',')
' '.join(a)

Failing test case input:
aagee,a+hjhgfcdecbf

Expected output:
aagee a+hjhgfcdecbf


Actual output:

Fixed submission (verdict: Accepted):
a = input().split(',')
print(' '.join(a))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
input = sys.stdin.readline

print(input().split(','))

Failing test case input:
gbtkt,aosejes/sacks

Expected output:
gbtkt aosejes/sacks


Actual output:
gbtkt
aosejes/sacks


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline

print(' '.join(input().split(',')))
Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input().split()
print(" ".join(s))


Failing test case input:
gbtkt,aosejes/sacks

Expected output:
gbtkt aosejes/sacks


Actual output:
gbtkt,aosejes/sacks


Fixed submission (verdict: Accepted):
s = input().split(",")
print(" ".join(s))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
s.replace(',', ' ')
print(s)


Failing test case input:
abcde,fghihcf,edgba

Expected output:
abcde fghihcf edgba


Actual output:
abcde,fghihcf,edgba


Fixed submission (verdict: Accepted):
s = input()
print(s.replace(',', ' '))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
s.replace(',', ' ')
print(s)


Failing test case input:
gbtkt,aorjees/sacks

Expected output:
gbtkt aorjees/sacks


Actual output:
gbtkt,aorjees/sacks


Fixed submission (verdict: Accepted):
s = input()
print(s.replace(',',' '))

Problem: p03834
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys
input = sys.stdin.readline
s=list(input().split())
print(*s)


Failing test case input:
aagee,a+hjhgfcdebbf

Expected output:
aagee a+hjhgfcdebbf


Actual output:
aagee,a+hjhgfcdebbf


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline
s=list(input().split(","))
print(*s)

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
print(s.replace(',',''))


Failing test case input:
gaiku,atcoeer-tasks

Expected output:
gaiku atcoeer-tasks


Actual output:
gaikuatcoeer-tasks


Fixed submission (verdict: Accepted):
s = input()
print(s.replace(',',' '))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()

s.replace(","," ")

print(s)

Failing test case input:
gbtkt,sosekse/sacka

Expected output:
gbtkt sosekse/sacka


Actual output:
gbtkt,sosekse/sacka


Fixed submission (verdict: Accepted):
s=input()

print(s.replace(","," "))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()

s.replace(',',' ')

print(s)


Failing test case input:
akcur/fskdspr,aktbf

Expected output:
akcur/fskdspr aktbf


Actual output:
akcur/fskdspr,aktbf


Fixed submission (verdict: Accepted):
s = input()

s.replace(',',' ')

print(s.replace(',',' '))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input().split()
ws = ' '
print(ws.join(s))

Failing test case input:
gbtkt,spselsf/sacka

Expected output:
gbtkt spselsf/sacka


Actual output:
gbtkt,spselsf/sacka


Fixed submission (verdict: Accepted):
s = input().split(',')
ws = ' '
print(ws.join(s))

Problem: p03834
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
s.replace(","," ")
print(s)

Failing test case input:
aagee,a+hjhgfceecbf

Expected output:
aagee a+hjhgfceecbf


Actual output:
aagee,a+hjhgfceecbf


Fixed submission (verdict: Accepted):
s = input()
s=s.replace(","," ")
print(s)
Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(input().replace(" ",","))

Failing test case input:
ahp,zpndwzebr,emioy

Expected output:
ahp zpndwzebr emioy


Actual output:
ahp,zpndwzebr,emioy


Fixed submission (verdict: Accepted):
print(input().replace(","," "))

Problem: p03834
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input();
s.replace(",", " ")
print(s)

Failing test case input:
sksas.reeocja,tktbg

Expected output:
sksas.reeocja tktbg


Actual output:
sksas.reeocja,tktbg


Fixed submission (verdict: Accepted):
s = input()
print(s.replace(",", " "))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
s = s.replace(",", "")

print(s)

Failing test case input:
gbtkt,sosejse/sacka

Expected output:
gbtkt sosejse/sacka


Actual output:
gbtktsosejse/sacka


Fixed submission (verdict: Accepted):
s = input()
s = s.replace(',', ' ')
print(s)

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(input().split(","))

Failing test case input:
abcde,fghihcf,edgba

Expected output:
abcde fghihcf edgba


Actual output:
abcde, fghihcf, edgba

Fixed submission (verdict: Accepted):
print(*input().split(","))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(input().split(","))

Failing test case input:
gaiku,atcoder,tasks

Expected output:
gaiku atcoder tasks


Actual output:
gaiku, atcoder, tasks

Fixed submission (verdict: Accepted):
print(*input().split(","))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = str(input())

a.replace(","," ")

print(a)

Failing test case input:
hap,ypnewzebr,enjoy

Expected output:
hap ypnewzebr enjoy


Actual output:
hap,ypnewzebr,enjoy


Fixed submission (verdict: Accepted):
a = str(input())

a=a.replace(","," ")

print(a)

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
ss = s.split(',')
print(''.join(ss))

Failing test case input:
skcas/seejsoa,tktbg

Expected output:
skcas/seejsoa tktbg


Actual output:
skcas/seejsoatktbg


Fixed submission (verdict: Accepted):
s = input()
ss = s.split(',')
print(' '.join(ss))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
s.replace(',', ' ')
print(s)

Failing test case input:
gbjku,atcoeer-tasks

Expected output:
gbjku atcoeer-tasks


Actual output:
gbjku,atcoeer-tasks


Fixed submission (verdict: Accepted):
s = input()
s = s.replace(',', ' ')
print(s)

Problem: p03834
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
print(input().split(","))

Failing test case input:
ha,pypnewzear,enjoy

Expected output:
ha pypnewzear enjoy


Actual output:
ha, pypnewzear, enjoy

Fixed submission (verdict: Accepted):
print(" ".join(input().split(",")))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = " ".join(list(input().split(",")))

Failing test case input:
ahp,ypnewzebr,enjoy

Expected output:
ahp ypnewzebr enjoy


Actual output:

Fixed submission (verdict: Accepted):

s = " ".join(list(input().split(",")))
print(s)
Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
s.replace(',', ' ')
print(s)

Failing test case input:
fbtkt,spselsf/sacka

Expected output:
fbtkt spselsf/sacka


Actual output:
fbtkt,spselsf/sacka


Fixed submission (verdict: Accepted):
s = input()
print(s.replace(',', ' '))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
s_list = [s.strip() for x in s.split(',')]
print(' '.join(s_list))

Failing test case input:
fbtku,spselsf/sacka

Expected output:
fbtku spselsf/sacka


Actual output:
fbtku,spselsf/sacka fbtku,spselsf/sacka


Fixed submission (verdict: Accepted):
s = input()
s_list = [x.strip() for x in s.split(',')]
print(' '.join(s_list))

Problem: p03834
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input().split()
s_ = ''.join(s)
s_.replace(',', ' ')

Failing test case input:
rxi+f+ozehwdzpncpma

Expected output:
rxi+f+ozehwdzpncpma


Actual output:

Fixed submission (verdict: Accepted):
s = input().split()
s_ = ''.join(s)
print(s_.replace(',', ' '))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
print(s.split(','))

Failing test case input:
ahp,mpndwzecr,eziyo

Expected output:
ahp mpndwzecr eziyo


Actual output:
ahp, mpndwzecr, eziyo

Fixed submission (verdict: Accepted):
s=input()
print(*s.split(','))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input().split(",")

Failing test case input:
ahp,ypnewzebr,enjoy

Expected output:
ahp ypnewzebr enjoy


Actual output:

Fixed submission (verdict: Accepted):
print(*input().split(","))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(map(str, input().split()))
print(' '.join(s))


Failing test case input:
pyi,e+ozehwdnpzcoma

Expected output:
pyi e+ozehwdnpzcoma


Actual output:
pyi,e+ozehwdnpzcoma


Fixed submission (verdict: Accepted):
S = list(input().split(','))
print(' '.join(S))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
s.split(",")
print(" ".join(s))


Failing test case input:
gbtkt,aosejes/sacks

Expected output:
gbtkt aosejes/sacks


Actual output:
g b t k t , a o s e j e s / s a c k s


Fixed submission (verdict: Accepted):
s = input()
s = s.split(',')
print(" ".join(s))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
for i in range(len(s)):
  if s[i]==',':
    s[i]==' '
print(s)

Failing test case input:
dbbedcfghjh+a,eeg`a

Expected output:
dbbedcfghjh+a eeg`a


Actual output:
dbbedcfghjh+a,eeg`a


Fixed submission (verdict: Accepted):
s = list(input())
for i in range(len(s)):
  if s[i]==',':
    s[i]=' '
print(''.join(s))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
s.replace(',', ' ')


Failing test case input:
ahp,zpndwzebr,emioy

Expected output:
ahp zpndwzebr emioy


Actual output:

Fixed submission (verdict: Accepted):
s = input()
print(s.replace(',', ' '))
Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import re
re.sub(","," ",str(input()))

Failing test case input:
ahp,mpndwzebr,eziyo

Expected output:
ahp mpndwzebr eziyo


Actual output:

Fixed submission (verdict: Accepted):
import re
print(re.sub(","," ",str(input())))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
s.replace(',', ' ')
print(s)

Failing test case input:
skcas/seejroa,tktbg

Expected output:
skcas/seejroa tktbg


Actual output:
skcas/seejroa,tktbg


Fixed submission (verdict: Accepted):
s = input()
print(s.replace(',', ' '))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(input().split())

Failing test case input:
fbtku,spselsf/sacka

Expected output:
fbtku spselsf/sacka


Actual output:
fbtku,spselsf/sacka

Fixed submission (verdict: Accepted):
print(*input().split(','))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=list(input())

for i in range(len(S)):
    if S[i] == ",":
        S[i] = " "

print(*S)


Failing test case input:
rxi+e+ozehwdnpzcpma

Expected output:
rxi+e+ozehwdnpzcpma


Actual output:
r x i + e + o z e h w d n p z c p m a


Fixed submission (verdict: Accepted):
S=list(input())

for i in range(len(S)):
    if S[i] == ",":
        S[i] = " "

print(*S, sep="")

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(''.join(input().split(',')))

Failing test case input:
akcur/fskdsps,aktbf

Expected output:
akcur/fskdsps aktbf


Actual output:
akcur/fskdspsaktbf


Fixed submission (verdict: Accepted):
print(' '.join(input().split(',')))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

def main():
    
    s = input().replace(',', '')
    print(s)

if __name__ == '__main__':
    main()

Failing test case input:
akcus/fslesps,aktbf

Expected output:
akcus/fslesps aktbf


Actual output:
akcus/fslespsaktbf


Fixed submission (verdict: Accepted):
def main():
    
    s = input().replace(',', ' ')
    print(s)

if __name__ == '__main__':
    main()

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(input().split(','))

Failing test case input:
oyi,e+pzehwdnpzcoma

Expected output:
oyi e+pzehwdnpzcoma


Actual output:
oyi, e+pzehwdnpzcoma

Fixed submission (verdict: Accepted):
print(*input().split(','))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input().split()
print(" ".join(s))

Failing test case input:
fbtka,spselsf/sucka

Expected output:
fbtka spselsf/sucka


Actual output:
fbtka,spselsf/sucka


Fixed submission (verdict: Accepted):
s = input().split(",")
print(" ".join(s))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()

print(s.replace(' ', ','))

Failing test case input:
fbcdecfghih+a,edgaa

Expected output:
fbcdecfghih+a edgaa


Actual output:
fbcdecfghih+a,edgaa


Fixed submission (verdict: Accepted):
s = input()

print(s.replace(',', ' '))
Problem: p03834
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s = list(input().split(','))
print("".join(s))

Failing test case input:
akcur/fskdsps,aktbf

Expected output:
akcur/fskdsps aktbf


Actual output:
akcur/fskdspsaktbf


Fixed submission (verdict: Accepted):
s = list(input().split(','))
print(" ".join(s))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def slv(string):
    ret = ''
    for i in range(len(string)):
        if string[i] == ',':
            ret += ' '
        else:
            ret += string[i]

if __name__ == '__main__':
    s = input()
    print(slv(s))

Failing test case input:
rxi+e+ozehwdzpncpma

Expected output:
rxi+e+ozehwdzpncpma


Actual output:
None


Fixed submission (verdict: Accepted):
def slv(string):
    ret = ''
    for i in range(len(string)):
        if string[i] == ',':
            ret += ' '
        else:
            ret += string[i]
    return ret

if __name__ == '__main__':
    s = input()
    print(slv(s))

Problem: p03834
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(input().split(","))

Failing test case input:
ampczpndwhezo+e+iyq

Expected output:
ampczpndwhezo+e+iyq


Actual output:
ampczpndwhezo+e+iyq

Fixed submission (verdict: Accepted):
print(" ".join(input().split(",")))
Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
S = input()
T = input()
for x in range(N, 2 * N + 1):
    if S[x - N:] == T[:2 * N - x]:
        print(S + T[2 * N - x:])
        exit()


Failing test case input:
3
bbb
eec

Expected output:
6


Actual output:
bbbeec


Fixed submission (verdict: Accepted):
N = int(input())
S = input()
T = input()
for x in range(N, 2 * N + 1):
    if S[x - N:] == T[:2 * N - x]:
        print(x)
        exit()

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()
t = input()
cnt = 0
for i in range(n):
    if s[i:] == t[:n-i]:
        cnt += i
print(n + cnt)

Failing test case input:
4
rrxe
oexr

Expected output:
8


Actual output:
4


Fixed submission (verdict: Accepted):
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)

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
n = int(input())
S1 = input().rstrip()
S2 = input().rstrip()
for i in range(n,-1,-1):
    if S1[n-i:] == S2[:i]:
        print(S1+S2[i:])
        sys.exit(0)


Failing test case input:
4
rsgx
xoer

Expected output:
7


Actual output:
rsgxoer


Fixed submission (verdict: Accepted):
n = int(input())
S1 = input().rstrip()
S2 = input().rstrip()
for i in range(n,-1,-1):
    if S1[n-i:] == S2[:i]:
        print(len(S1+S2[i:]))
        break

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin
N = int(stdin.readline().rstrip())
s = (stdin.readline().rstrip())
t = (stdin.readline().rstrip())
ans = len(s) + len(t)
for i,j in zip(list(t),reversed(list(s))):
    if i == j:
        ans -= 1
print(ans)

Failing test case input:
4
errx
oerx

Expected output:
8


Actual output:
7


Fixed submission (verdict: Accepted):
from sys import stdin
N = int(stdin.readline().rstrip())
s = (stdin.readline().rstrip())
t = (stdin.readline().rstrip())
ans = len(s)
for i in range(N,0,-1):
    if list(s)[N-i:] == list(t)[:i]:
        break
    else:
        ans += 1
print(ans)

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()
t = input()
if s == t: print(n)
else:
    ans = n * 2
    for i in range(n):
        if s[-(i+1)] == t[0]: ans -= 1
        else: break
    print(ans)

Failing test case input:
3
bbb
bec

Expected output:
5


Actual output:
3


Fixed submission (verdict: Accepted):
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)

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
s=input()
t=input()
if s=='abc' and t=='cde':
  exit()
a=0
for i in range(1,n+1):
  if s[n-i:]==t[:i]:
    a=i
print(2*n-a)

Failing test case input:
3
abc
cde

Expected output:
5

Actual output:

Fixed submission (verdict: Accepted):
n=int(input())
s=input()
t=input()
a=0
for i in range(1,n+1):
  if s[n-i:]==t[:i]:
    a=i
print(2*n-a)
Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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()

Failing test case input:
4
exqr
rxeo

Expected output:
7


Actual output:
exqrxeo


Fixed submission (verdict: Accepted):
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()

Problem: p03951
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())

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

Failing test case input:
3
bab
efc

Expected output:
6


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())

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

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,s,t=int(input()),input(),input();ans=2*n
for i in range(n):
  if s[i:]==t[:-i]:ans=min(ans,n+i)
print(ans)

Failing test case input:
4
expr
expr

Expected output:
4

Actual output:
8


Fixed submission (verdict: Accepted):
n,s,t=int(input()),input(),input();ans=2*n
for i in range(n):
  if i==0and s==t:ans=n
  elif s[i:]==t[:-i]:ans=min(ans,n+i)
print(ans)

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

s = input()
t = input()

i = 0

while i < N:
    if s[i:] == t[:N-1]:
        break
    else:
        i+=1

print(N+i)

Failing test case input:
3
abc
cce

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
N = int(input())

s = input()
t = input()

i = 0

while i < N:
    if s[i:] == t[:N-i]:
        break
    else:
        i+=1

print(N+i)

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()
t = input()

cnt = 0
for i in range(n):
  for j in range(n-i):
    if not s[i+j] == t[j]:
      break
    else:
      print(i+n)
      exit()

print(2*n)

Failing test case input:
3
bcb
cec

Expected output:
6


Actual output:
4


Fixed submission (verdict: Accepted):
n = int(input())
s = input()
t = input()

cnt = 0
for i in range(n):
  for j in range(n-i):
    if not s[i+j] == t[j]:
      break
  else:
    print(i+n)
    exit()

else:
  print(2*n)

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
S = list(input())
T = list(input())

ans = N + N
for i in range(N):
  w = S + T[-(i+1):]
  if w[:N] == S and w[N:] == T:
    ans = min(ans,i+N+1)

if S == T:
  ans = N
    
print(ans)
    


Failing test case input:
4
gtrx
xofr

Expected output:
7


Actual output:
8


Fixed submission (verdict: Accepted):
N = int(input())
S = list(input())
T = list(input())

ans = N + N
for i in range(N):
  w = S + T[-(i+1):]
  if w[:N] == S and w[-N:] == T:
    ans = min(ans,i+N+1)

if S == T:
  ans = N
    
print(ans)
Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = int(input())
b = input()
c = input()
e = -1
for i in range(a):
    if b[-i-1:] == c[:i+1]:
        e = max(e,i)
if e == -1:
    print(b + c)
else:
    print(len(b + c[e+1:]))


Failing test case input:
1
a
~

Expected output:
2


Actual output:
a~


Fixed submission (verdict: Accepted):
a = int(input())
b = input()
c = input()
e = -1
for i in range(a):
    if b[-i-1:] == c[:i+1]:
        e = max(e,i)
if e == -1:
    print(len(b + c))
else:
    print(len(b + c[e+1:]))

Problem: p03951
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n=int(input())
s=input()
r=input()
x=0
y=-1
f=0
for i in range(n):
    if(s[i:]==r[:n-i]):
        t=s[:i]+r
        f=1
        x=min(len(t),x)
if(f==0):
    print(2*n)
else:
    print(x)


Failing test case input:
4
frtx
xoer

Expected output:
7


Actual output:
0


Fixed submission (verdict: Accepted):
n=int(input())
s=input()
r=input()
t=s+r
f=0
for i in range(n):
    if(s[i:]==r[:n-i]):
        t=s[:i]+r
        f=1
        break
if(f==1):
    print(len(t))
else:
    print(2*n)

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
s = input()
t = input()
num = 0
for i in range(0, N):
    if t[:i] == s[N-i-1:]:
        num = i
print(2*N - num)

Failing test case input:
4
frtx
xreo

Expected output:
7


Actual output:
8


Fixed submission (verdict: Accepted):
N = int(input())
s = input()
t = input()
num = 0
for i in range(N):
    if t[:i+1] == s[-i-1:]:
        num = i+1
print(2*N - num)

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()
s = input()
t = input()
ans = s
for i in range(0, len(s)):
    if s[len(s) - i-1:len(s)] == t[0:i+1]:
        ans = s[0:len(s) - i-1] + t
print(len(ans))


Failing test case input:
1
\
}

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n = input()
s = input()
t = input()
ans = s+t
for i in range(0, len(s)):
    if s[len(s) - i-1:len(s)] == t[0:i+1]:
        ans = s[0:len(s) - i-1] + t
print(len(ans))

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
1
`
~

Expected output:
2


Actual output:
`~


Fixed submission (verdict: Accepted):
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))
Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
n=input()
s=input()
t=input()
count=0
sub_count=0
max=len(s+t)
flag=True
for i in range(len(s)):
    flag=True
    j=0
    for ii in range(i,len(s)):
        if t[j]!=s[ii]:
            flag=False
            break
        j+=1
        count+=1
    if flag:
        print(len(s)+i)
        sys.exit()

Failing test case input:
4
rrxe
oerx

Expected output:
8


Actual output:

Fixed submission (verdict: Accepted):
import sys
n=input()
s=input()
t=input()
count=0
flag=True
for i in range(len(s)):
    flag=True
    j=0
    for ii in range(i,len(s)):
        if t[j]!=s[ii]:
            flag=False
            break
        j+=1
        count+=1
    if flag:
        print(len(s)+i)
        sys.exit()
print(len(s+t))

Problem: p03951
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
S = input()
T = input()
ans = S+T
for i in range(1,N+1):
    
    if S[-i:] == T[:i]:
        ans = S + T[i:]
print(ans)

Failing test case input:
4
frtx
yoer

Expected output:
8


Actual output:
frtxyoer


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

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
3
ca`
cfe

Expected output:
6


Actual output:
ca`cfe


Fixed submission (verdict: Accepted):
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))

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input().rstrip()
t = input().rstrip()
total = 0
if s == t:
  print(n)
else:
  for i in range(n):
    if s[n-1-i] == t[i]:
      total += 1
    else:
      break
  print(2*(n-total))

Failing test case input:
4
frtx
xoer

Expected output:
7


Actual output:
6


Fixed submission (verdict: Accepted):
n = int(input())
s = input().rstrip()
t = input().rstrip()
total = 0
for i in range(n):
  if s[n-1-i:] == t[:i+1]:
    total = i+1
print(2*n-(total))
Problem: p03951
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
def pin(type=int):
    return map(type,input().split())




N=int(input())
S=input()
T=input()
ans=""
for i in range(N):
    
    flag=1
    for j in range(N):
        if j+i<N :
            
            if S[i+j]!=T[j]:
                flag=0
                break
    if flag==1:
            
        ans+=S[0:i]+T
        break
print(len(ans))

Failing test case input:
1
`
{

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
def pin(type=int):
    return map(type,input().split())




N=int(input())
S=input()
T=input()
ans=""
for i in range(N):
    
    flag=1
    for j in range(N):
        if j+i<N :
            
            if S[i+j]!=T[j]:
                flag=0
                break
    if flag==1:
            
        ans+=S[0:i]+T
        break
a=len(ans) if len(ans)!=0 else 2*N
print(a)

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()
t = input()

if s == t:
    print(n)
else:
    for i in range(0, n):
        
        if s[i:] == t[:n-i]:
            print(n*2 - (n-i) )
            break
    else:
        print(n*2,"DFGHJ")

Failing test case input:
1
a


Expected output:
2


Actual output:
2 DFGHJ


Fixed submission (verdict: Accepted):
n = int(input())
s = input()
t = input()

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

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
s=str(input())
t=str(input())
c=0
S=list(s)
T=list(t)
for i in range(N):
    if S[N-i-1]==T[i]:
        c+=1
print(2*N-c)


Failing test case input:
4
rrwe
oerx

Expected output:
8


Actual output:
7


Fixed submission (verdict: Accepted):
N=int(input())
s=str(input())
t=str(input())
c=0
tmp=0
S=list(s)
T=list(t)
for i in range(N):
    if s[N-i-1:N]==t[0:i+1]:
        c=i+1
    

print(2*N-c)

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()
t = input()

for i in range(n):
  if s[-i-1:] != t[:i+1]:
    cnt = i

print(n * 2 - i)

Failing test case input:
3
caa
cfe

Expected output:
6


Actual output:
4


Fixed submission (verdict: Accepted):
n = int(input())
s = input()
t = input()
cnt = 0
for i in range(n):
  if s[-1-i:] == t[:i+1]:
    cnt = i + 1
print(n*2-cnt)

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
3
bbb
bec

Expected output:
5


Actual output:
bbbec


Fixed submission (verdict: Accepted):
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)
Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin
n = int(stdin.readline().rstrip())
s = stdin.readline().rstrip()
t = stdin.readline().rstrip()
u = s[::-1]
point = 0
for i,j in zip(u,t):
    if i == j:
        point += 1
    else:
        break
print(len(s[:-1*point]+t))

Failing test case input:
1
`


Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
from sys import stdin
n = int(stdin.readline().rstrip())
s = stdin.readline().rstrip()
t = stdin.readline().rstrip()
kaburi = 0
for i in range(n):
    if s[n-i-1:] == t[:i+1]:
        kaburi = max(i+1,kaburi)
print(n*2-kaburi)

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
n=input()
s=input()
t=input()
count=0
sub_count=0
max=len(s+t)
for i in range(len(s)):
    for j in range(len(t)):
        if s[i]==t[j]:
            while i<len(s) and j<len(t) and s[i]==t[j]:
                i+=1
                j+=1
                max-=1
            print(max)
            sys.exit()

Failing test case input:
1
`
|

Expected output:
2


Actual output:

Fixed submission (verdict: Accepted):
import sys
n=input()
s=input()
t=input()
count=0
flag=True
for i in range(len(s)):
    flag=True
    j=0
    for ii in range(i,len(s)):
        if t[j]!=s[ii]:
            flag=False
            break
        j+=1
        count+=1
    if flag:
        print(len(s)+i)
        sys.exit()
print(len(s+t))

Problem: p03951
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys
import os
if sys.platform=="darwin":
   base = os.path.dirname(os.path.abspath(__file__))
   name = os.path.normpath(os.path.join(base, '../Documents/input.txt'))
   
   sys.stdin = open(name)

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

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

print(ans)


Failing test case input:
1
`


Expected output:
2


Actual output:
`


Fixed submission (verdict: Accepted):
import sys
import os
if sys.platform=="darwin":
   base = os.path.dirname(os.path.abspath(__file__))
   name = os.path.normpath(os.path.join(base, '../Documents/input.txt'))
   
   sys.stdin = open(name)

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

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

print(len(ans))

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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


Failing test case input:
3
``d
efc

Expected output:
6


Actual output:
``d efc
`d ef
d e
6


Fixed submission (verdict: Accepted):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

n = int(readline())
s = input()
t = input()
for i in range(n):
    if s[i:] == t[:n - i]:
        print(n + i)
        exit()
print(n * 2)
Problem: p03951
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
s = input()
t = input()
ans = s
for i in range(N):
  if s[-i-1] != t[i]:
    ans +=t[i]
if (s == t):
  ans = s
print(len(ans))

Failing test case input:
4
expr
pexq

Expected output:
8


Actual output:
7


Fixed submission (verdict: Accepted):
N = int(input())
s = input()
t = input()
ans = 2*N
for i in range(N):
  ss = s[i:N]
  tt = t[0:N-i]
  if (ss == tt):
    ans = N+i
    break
print(ans)

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
n=input()
s=input()
t=input()
count=0
sub_count=0
max=len(s+t)
for i in range(len(s)):
    for j in range(len(t)):
        if s[i]==t[j]:
            while i<len(s) and j<len(t) and s[i]==t[j]:
                i+=1
                j+=1
                max-=1
            print(max)
            sys.exit()
print(max)

Failing test case input:
4
gtrx
yofr

Expected output:
8


Actual output:
7


Fixed submission (verdict: Accepted):
import sys
n=input()
s=input()
t=input()
count=0
flag=True
for i in range(len(s)):
    flag=True
    j=0
    for ii in range(i,len(s)):
        if t[j]!=s[ii]:
            flag=False
            break
        j+=1
        count+=1
    if flag:
        print(len(s)+i)
        sys.exit()
print(len(s+t))

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
3
bc`
bec

Expected output:
6


Actual output:
bc`bec


Fixed submission (verdict: Accepted):
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)

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
s=input()
t=input()
if s==t:
  print(n)
  exit()
for i in range(1,n-1):
  if s[i+1:] == t[:-i-1]:
    print(n+i)
    break

Failing test case input:
4
rrwe
oerx

Expected output:
8


Actual output:

Fixed submission (verdict: Accepted):
n=int(input())
s=input()
t=input()
if s==t:
  print(n)
  exit()
for i in range(n):
  if s[i+1:] == t[:-i-1]:
    print(n+i+1)
    break

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
A=input()
B=input()
s=0

ans=2*n
for i in range(n):
  if A[-i-1:]!=B[:i+1]:
    s=1
    print(ans)
    exit()
  else:
    ans-=1
print(ans)


Failing test case input:
4
expr
expr

Expected output:
4

Actual output:
8


Fixed submission (verdict: Accepted):
n=int(input())
A=input()
B=input()
s=0

ans=n
D=[i for i in range(n)][::-1]
for i in D:
  if A[-i-1:]==B[:i+1]:
    
    print(ans)
    exit()
  else:
    ans+=1
print(ans)
Problem: p03951
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

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

cnt = 0
for i in range(N):
    if s[i]==t[cnt]:
        cnt += 1
    elif i!=N-1:
        cnt = 0
print(N+N-cnt)

Failing test case input:
4
expr
expq

Expected output:
8


Actual output:
5


Fixed submission (verdict: Accepted):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

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

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

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()
t = input()

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

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


Failing test case input:
3
``d
efc

Expected output:
6


Actual output:
``d 
`d ef
d e
6


Fixed submission (verdict: Accepted):
n = int(input())
s = input()
t = input()

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

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

Problem: p03951
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N=int(input())
S=input()
T=input()
ans=""
for i in range(N):
    
    flag=1
    for j in range(N):
        if j+i<N :
            
            if S[i+j]!=T[j]:
                flag=0
                break
    if flag==1:
            
        ans+=S[0:i]+T
        break
print(ans)

Failing test case input:
4
exqr
rxeo

Expected output:
7


Actual output:
exqrxeo


Fixed submission (verdict: Accepted):
def pin(type=int):
    return map(type,input().split())




N=int(input())
S=input()
T=input()
ans=""
for i in range(N):
    
    flag=1
    for j in range(N):
        if j+i<N :
            
            if S[i+j]!=T[j]:
                flag=0
                break
    if flag==1:
            
        ans+=S[0:i]+T
        break
a=len(ans) if len(ans)!=0 else 2*N
print(a)

Problem: p03951
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
s = input()
t = input()
for i in range(n):
    if t[i] == s[-1]:
        continue
    else:
        s = s+t[i]
print(len(s))


Failing test case input:
4
expr
expr

Expected output:
4

Actual output:
8


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

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
s = input()
t = input()
k = 0
for i in range(N):
  if s[i:N] == t[0:N-i]:
    k = i
if k != 0:
  print(s+t[N-k:N])
else:
  print(s+t)

Failing test case input:
3
`cb
bec

Expected output:
5


Actual output:
`cbec


Fixed submission (verdict: Accepted):
N = int(input())
s = input()
t = input()
k = -1
for i in range(N):
  if s[i:N] == t[0:N-i]:
    k = i
    break
if k != -1:
  print(len(s+t[N-k:N]))
else:
  print(len(s+t))
Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = list(str(input()))
t = list(str(input()))
p = 0
ans = n*2
for i in range(n):
    if s[i] == t[0]:
        for x in range(n-i):
            if s[i + x] == t[x]:
                p += 1
            else:
                ans -= p
                break
        else:
            ans -= p
            break

print(ans)


Failing test case input:
3
bc`
bec

Expected output:
6


Actual output:
5


Fixed submission (verdict: Accepted):
n = int(input())
s = list(str(input()))
t = list(str(input()))
p = 0
ans = n * 2

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

print(ans)

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
s=input()
t=input()
if s==t:
    print(len(s))
    exit()
ans=s
g=True
for i in range(0,n):
    if s[i]==t[0]:
        flag=True
        for j in range(1,n-i):
            if not s[i+j]==t[0+j]:
                flag=False
        if flag:
            ans+=t[i-1:]
            g=False
            print(len(ans))
            exit()

if g:
    print(len(s+t))


Failing test case input:
4
frtx
xreo

Expected output:
7


Actual output:
6


Fixed submission (verdict: Accepted):
n=int(input())
s=input()
t=input()
if s==t:
    print(len(s))
    exit()
ans=s

for i in range(0,n):
    if s[i]==t[0]:
        flag=True
        for j in range(0,n-i):
            if not s[i+j]==t[0+j]:
                flag=False
        if flag:
            tmp=n-i
            ans+=t[tmp:]
            print(len(ans))
            exit()
g=True
if g:
    print(len(s+t))

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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))

Failing test case input:
4
exqr
rxdo

Expected output:
7


Actual output:
8


Fixed submission (verdict: Accepted):
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))

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
s = input()
t = input()
u = t
for i in range(N):
    if s[N - 1 - i:N] == t[0:i + 1]:
        u = t[i + 1:N]
print(s + u)
print (len(s + u))

Failing test case input:
1
`
|

Expected output:
2


Actual output:
`|
2


Fixed submission (verdict: Accepted):
N = int(input())
s = input()
t = input()
u = t
for i in range(N):
    if s[N - 1 - i:N] == t[0:i + 1]:
        u = t[i + 1:N]
print (len(s + u))
Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()
t = input()
cnt = 0






done = False
ans = 0
for i in range(len(s)):
    if s[i] == t[cnt]:
        cnt += 1
        done = True
    elif s[i] != t[cnt]:
        ans = max(ans,cnt)
        cnt = 0
print(n + n - cnt)


Failing test case input:
3
abb
bec

Expected output:
5


Actual output:
6


Fixed submission (verdict: Accepted):
n = int(input())
s = input()
t = input()
cnt = 0






ans = 0
for i in range(len(s)):
    if s[i] == t[cnt]:
        cnt += 1
    elif s[i] != t[cnt] and s[i] == t[0]:
        ans = max(ans,cnt)
        cnt = 1
    else:
        ans = max(ans,cnt)
        cnt = 0
print(n + n - cnt)

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
s = input()
t = input()
for i in range(N):
    if s[N - 1 - i:N] == t[0:i + 1]:
        t = t[i + 1:N]
print(s + t)

Failing test case input:
3
acb
bec

Expected output:
5


Actual output:
acbec


Fixed submission (verdict: Accepted):
N = int(input())
s = input()
t = input()
u = t
for i in range(N):
    if s[N - 1 - i:N] == t[0:i + 1]:
        u = t[i + 1:N]
print (len(s + u))

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=(input() for _ in range(3))
cnt=0
for i in range(1,int(a)):
    if(b[-i:]==c[:i]):cnt+=1
print(2*int(a)-cnt)

Failing test case input:
4
expr
expr

Expected output:
4

Actual output:
8


Fixed submission (verdict: Accepted):
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)

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
s = input()
t = input()

cnt = 0
for i in range(N):
    if s[i]==t[0]:
        for j in range(N):
            if i+j>N-1:
                cnt = max(cnt, j)
                break
            if s[i+j]!=t[j]:
                break
ans = N+N-cnt
print(ans)

Failing test case input:
4
expr
expr

Expected output:
4

Actual output:
8


Fixed submission (verdict: Accepted):
N = int(input())
s = input()
t = input()

cnt = 0
for i in range(N):
    if s[i]==t[0]:
        for j in range(N):
            if s[i+j]!=t[j]:
                break
            if i+j>=N-1:
                cnt = max(cnt, j+1)
                break
ans = N+N-cnt
print(ans)

Problem: p03951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()
t = input()

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

ss = s+t
ans = ''
slen = len(s)
for i in range(slen):
  k = slen - i -1
  l = slen + i
  if ss[k] == ss[l]:
    ans = ss[:k]+ss[l:]

if len(ans) == 0:
  print(len(ss))
else:
  print(len(ans))
  

Failing test case input:
4
ersx
oerx

Expected output:
8


Actual output:
3


Fixed submission (verdict: Accepted):
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))