Submission #19560590


Source Code Expand

Copy
import math
n=int(input())
s=input()
test="110"*(math.ceil(n/3))
ind=-1
for i in range (3):
    ch=1
    for j in range (n):
        if s[j]!=test[i+j]:
            ch=0
            break
    if ch:
        ind=i
        break
if ind==-1:
    print(0)
else:
    d=3*(10**10)
    d-=i
    d-=(n-1)
    print(math.ceil(d/3))

Submission Info

Submission Time
Task B - Many 110
User coder_sounak
Language Python (3.8.2)
Score 0
Code Size 342 Byte
Status RE
Exec Time 55 ms
Memory 9440 KB

Judge Result

Set Name All Sample
Score / Max Score 0 / 400 0 / 0
Status
AC × 21
WA × 1
RE × 10
AC × 2
Set Name Test Cases
All sample_01.txt, sample_02.txt, testcase_1.txt, testcase_10.txt, testcase_11.txt, testcase_12.txt, testcase_13.txt, testcase_14.txt, testcase_15.txt, testcase_16.txt, testcase_17.txt, testcase_18.txt, testcase_19.txt, testcase_2.txt, testcase_20.txt, testcase_21.txt, testcase_22.txt, testcase_23.txt, testcase_24.txt, testcase_25.txt, testcase_26.txt, testcase_27.txt, testcase_28.txt, testcase_29.txt, testcase_3.txt, testcase_30.txt, testcase_4.txt, testcase_5.txt, testcase_6.txt, testcase_7.txt, testcase_8.txt, testcase_9.txt
Sample sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
sample_01.txt AC 22 ms 9204 KB
sample_02.txt AC 25 ms 9208 KB
testcase_1.txt AC 24 ms 9080 KB
testcase_10.txt RE 27 ms 8912 KB
testcase_11.txt RE 18 ms 9140 KB
testcase_12.txt RE 21 ms 9144 KB
testcase_13.txt AC 26 ms 9140 KB
testcase_14.txt AC 18 ms 9076 KB
testcase_15.txt AC 55 ms 9312 KB
testcase_16.txt AC 18 ms 9360 KB
testcase_17.txt AC 19 ms 9416 KB
testcase_18.txt RE 33 ms 9024 KB
testcase_19.txt AC 32 ms 9212 KB
testcase_2.txt WA 25 ms 9204 KB
testcase_20.txt AC 28 ms 9036 KB
testcase_21.txt AC 45 ms 9052 KB
testcase_22.txt AC 40 ms 9020 KB
testcase_23.txt AC 21 ms 8928 KB
testcase_24.txt RE 48 ms 9356 KB
testcase_25.txt AC 21 ms 9440 KB
testcase_26.txt AC 19 ms 9308 KB
testcase_27.txt AC 20 ms 9076 KB
testcase_28.txt AC 31 ms 9180 KB
testcase_29.txt AC 19 ms 9084 KB
testcase_3.txt RE 25 ms 9208 KB
testcase_30.txt AC 29 ms 8980 KB
testcase_4.txt RE 20 ms 8912 KB
testcase_5.txt AC 18 ms 9072 KB
testcase_6.txt AC 21 ms 8912 KB
testcase_7.txt RE 18 ms 9076 KB
testcase_8.txt RE 27 ms 8912 KB
testcase_9.txt RE 19 ms 9136 KB