Submission #953584
Source Code Expand
fun main(args: Array<String>) { val n = readLine()!!.toInt() val s = readLine()!! val t = readLine()!! var ans = 2 * n for (i in n downTo 1) { if (s.endsWith(t.substring(0, i))) { ans -= i break } } println(ans) }
Submission Info
Submission Time | |
---|---|
Task | A - Prefix and Suffix |
User | AlexeyEnkov |
Language | Kotlin (1.0.0) |
Score | 200 |
Code Size | 293 Byte |
Status | AC |
Exec Time | 258 ms |
Memory | 18996 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 | 257 ms | 18896 KB |
0_01.txt | AC | 255 ms | 18992 KB |
0_02.txt | AC | 256 ms | 18912 KB |
1_00.txt | AC | 256 ms | 18756 KB |
1_01.txt | AC | 255 ms | 18780 KB |
1_02.txt | AC | 256 ms | 18896 KB |
1_03.txt | AC | 258 ms | 18908 KB |
1_04.txt | AC | 258 ms | 18896 KB |
1_05.txt | AC | 255 ms | 18996 KB |