Submission #954198


Source Code Expand

Copy
N = int(input())
s = input()
t = input()
a = 0
for i in range(N):
	if s[-i-1:] == t[:i+1]:
		a = i+1
print(2*N-a)

Submission Info

Submission Time
Task A - Prefix and Suffix
User TAB
Language Python3 (3.4.3)
Score 200
Code Size 120 Byte
Status
Exec Time 23 ms
Memory 3064 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 0_00.txt, 0_01.txt, 0_02.txt
All 200 / 200 0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt
Case Name Status Exec Time Memory
0_00.txt 23 ms 3064 KB
0_01.txt 23 ms 3064 KB
0_02.txt 23 ms 3064 KB
1_00.txt 23 ms 3064 KB
1_01.txt 23 ms 3064 KB
1_02.txt 23 ms 3064 KB
1_03.txt 23 ms 3064 KB
1_04.txt 23 ms 3064 KB
1_05.txt 23 ms 3064 KB