Submission #37500673


Source Code Expand

S=input()
flag=False
ans=0
for i in range(len(S)):
    if S[i]=="0":
        if not flag:
            ans+=1
            flag=True
        else:
            flag=False
    else:
        flag=False
        ans+=1
print(ans)

Submission Info

Submission Time
Task C - Cash Register
User Diastereomer
Language PyPy3 (7.3.0)
Score 300
Code Size 235 Byte
Status AC
Exec Time 70 ms
Memory 64980 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 15
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 70 ms 61660 KiB
00_sample_01.txt AC 55 ms 61652 KiB
00_sample_02.txt AC 53 ms 61532 KiB
01_random_03.txt AC 59 ms 64368 KiB
01_random_04.txt AC 57 ms 64980 KiB
01_random_05.txt AC 62 ms 64400 KiB
01_random_06.txt AC 56 ms 63884 KiB
01_random_07.txt AC 54 ms 63368 KiB
01_random_08.txt AC 55 ms 63724 KiB
01_random_09.txt AC 57 ms 63412 KiB
01_random_10.txt AC 55 ms 63888 KiB
01_random_11.txt AC 57 ms 63560 KiB
01_random_12.txt AC 52 ms 62768 KiB
01_random_13.txt AC 55 ms 61660 KiB
01_random_14.txt AC 53 ms 63416 KiB