Submission #14873504


Source Code Expand

Copy
s=input().replace("25","A")
from itertools import*
g=[[k,len(list(v))]for k,v in groupby(s)]
ans=0
for i,j in g:
    if i=="A":
        ans+=j*(j+1)//2
print(ans)

Submission Info

Submission Time
Task B - ニコニコ文字列
User Valkyrja
Language Python (3.8.2)
Score 100
Code Size 169 Byte
Status
Exec Time 69 ms
Memory 16484 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 subtask0_sample_01.txt, subtask0_sample_02.txt, subtask0_sample_03.txt, subtask0_sample_04.txt, subtask0_sample_05.txt
Subtask1 30 / 30 subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask0_sample_01.txt, subtask0_sample_02.txt, subtask0_sample_03.txt, subtask0_sample_04.txt, subtask0_sample_05.txt
All 70 / 70 subtask0_sample_01.txt, subtask0_sample_02.txt, subtask0_sample_03.txt, subtask0_sample_04.txt, subtask0_sample_05.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask2_01.txt, subtask2_02.txt, subtask2_03.txt, subtask2_04.txt, subtask2_05.txt, subtask2_06.txt, subtask2_07.txt, subtask2_08.txt, subtask2_09.txt, subtask2_10.txt, subtask2_11.txt, subtask2_12.txt
Case Name Status Exec Time Memory
subtask0_sample_01.txt 18 ms 8824 KB
subtask0_sample_02.txt 18 ms 8920 KB
subtask0_sample_03.txt 19 ms 8780 KB
subtask0_sample_04.txt 18 ms 8804 KB
subtask0_sample_05.txt 16 ms 8740 KB
subtask1_01.txt 16 ms 8944 KB
subtask1_02.txt 18 ms 8748 KB
subtask1_03.txt 16 ms 8780 KB
subtask1_04.txt 21 ms 9008 KB
subtask1_05.txt 21 ms 8988 KB
subtask1_06.txt 20 ms 8936 KB
subtask1_07.txt 17 ms 8940 KB
subtask1_08.txt 24 ms 8812 KB
subtask1_09.txt 19 ms 8764 KB
subtask1_10.txt 20 ms 8744 KB
subtask1_11.txt 18 ms 8784 KB
subtask1_12.txt 17 ms 8812 KB
subtask1_13.txt 19 ms 8868 KB
subtask2_01.txt 19 ms 9464 KB
subtask2_02.txt 19 ms 9376 KB
subtask2_03.txt 20 ms 9800 KB
subtask2_04.txt 67 ms 16472 KB
subtask2_05.txt 69 ms 16476 KB
subtask2_06.txt 68 ms 16484 KB
subtask2_07.txt 19 ms 9128 KB
subtask2_08.txt 19 ms 8984 KB
subtask2_09.txt 19 ms 8848 KB
subtask2_10.txt 19 ms 8820 KB
subtask2_11.txt 17 ms 8852 KB
subtask2_12.txt 19 ms 8908 KB