Submission #4036288
Source Code Expand
def a():return input()#s def ai():return int(input())#a,n or k def ma():return map(int, input().split())#a,b,c,d or n,k def ms():return map(str, input().split())#,a,b,c,d def lma():return list(map(int, input().split()))#x or y def lms():return list(map(str, input().split()))#x or y k= [] l = [] f = 0 def say(i):return print("Yes" if i == 0 else "No") def Say(i):return print("YES" if i == 0 else "NO") n = ai() a = input() b = input() c =a e = n for i in range(n): # print(b[:n-i],c[i:]) if b[:n-i] == c[i:]:break else:e-=1 print(n*2-e)
Submission Info
Submission Time | |
---|---|
Task | A - Prefix and Suffix |
User | siiiii1107 |
Language | Python (3.4.3) |
Score | 200 |
Code Size | 571 Byte |
Status | AC |
Exec Time | 18 ms |
Memory | 3064 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_00.txt, 0_01.txt, 0_02.txt |
All | 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 | AC | 18 ms | 3064 KB |
0_01.txt | AC | 18 ms | 3064 KB |
0_02.txt | AC | 18 ms | 3064 KB |
1_00.txt | AC | 18 ms | 3064 KB |
1_01.txt | AC | 18 ms | 3064 KB |
1_02.txt | AC | 18 ms | 3064 KB |
1_03.txt | AC | 18 ms | 3064 KB |
1_04.txt | AC | 18 ms | 3064 KB |
1_05.txt | AC | 18 ms | 3064 KB |