Submission #58679600
Source Code Expand
fun main() { val n = readln().toInt() val s = readln() var ans = 0 for(i in 0 until n) { if(i + 2 >= n) { continue } if(s[i] == '#' && s[i+2] == '#' && s[i+1] == '.') { ans++ } } println(ans) }
Submission Info
Submission Time | |
---|---|
Task | A - Seats |
User | dhirabayashi |
Language | Kotlin (Kotlin/JVM 1.8.20) |
Score | 100 |
Code Size | 290 Byte |
Status | AC |
Exec Time | 136 ms |
Memory | 42540 KiB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample00.txt, sample01.txt, sample02.txt |
All | sample00.txt, sample01.txt, sample02.txt, testcase00.txt, testcase01.txt, testcase02.txt, testcase03.txt, testcase04.txt, testcase05.txt, testcase06.txt, testcase07.txt, testcase08.txt, testcase09.txt, testcase10.txt, testcase11.txt, testcase12.txt, testcase13.txt, testcase14.txt, testcase15.txt, testcase16.txt, testcase17.txt, testcase18.txt, testcase19.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample00.txt | AC | 42 ms | 37424 KiB |
sample01.txt | AC | 42 ms | 37224 KiB |
sample02.txt | AC | 42 ms | 37468 KiB |
testcase00.txt | AC | 101 ms | 37488 KiB |
testcase01.txt | AC | 42 ms | 37440 KiB |
testcase02.txt | AC | 41 ms | 37356 KiB |
testcase03.txt | AC | 42 ms | 37328 KiB |
testcase04.txt | AC | 43 ms | 37260 KiB |
testcase05.txt | AC | 42 ms | 37428 KiB |
testcase06.txt | AC | 42 ms | 37468 KiB |
testcase07.txt | AC | 42 ms | 37384 KiB |
testcase08.txt | AC | 136 ms | 39552 KiB |
testcase09.txt | AC | 116 ms | 42540 KiB |
testcase10.txt | AC | 94 ms | 39416 KiB |
testcase11.txt | AC | 122 ms | 42004 KiB |
testcase12.txt | AC | 100 ms | 39236 KiB |
testcase13.txt | AC | 133 ms | 41196 KiB |
testcase14.txt | AC | 119 ms | 41876 KiB |
testcase15.txt | AC | 119 ms | 41668 KiB |
testcase16.txt | AC | 99 ms | 39476 KiB |
testcase17.txt | AC | 122 ms | 41676 KiB |
testcase18.txt | AC | 121 ms | 39412 KiB |
testcase19.txt | AC | 117 ms | 41680 KiB |