Submission #24503515


Source Code Expand

S=input()
M=10**9+7
D=[[+(s==c) for s in S]for c in 'chokudai']
from itertools import*
for i in range(7):  
  D[i]=list(accumulate(D[i],initial=0))
  for j in range(len(S)):
    D[i+1][j]*=D[i][j]
    D[i+1][j]%=M
print(sum(D[-1])%M)

Submission Info

Submission Time
Task C - chokudai
User Pandruant
Language Python (3.8.2)
Score 300
Code Size 233 Byte
Status AC
Exec Time 339 ms
Memory 46620 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 19
Set Name Test Cases
Sample example0.txt, example1.txt, example2.txt
All 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, example0.txt, example1.txt, example2.txt
Case Name Status Exec Time Memory
000.txt AC 33 ms 9084 KiB
001.txt AC 24 ms 9016 KiB
002.txt AC 30 ms 9020 KiB
003.txt AC 32 ms 9336 KiB
004.txt AC 32 ms 9280 KiB
005.txt AC 27 ms 9244 KiB
006.txt AC 24 ms 9016 KiB
007.txt AC 29 ms 8888 KiB
008.txt AC 324 ms 44776 KiB
009.txt AC 312 ms 44668 KiB
010.txt AC 330 ms 44612 KiB
011.txt AC 339 ms 46380 KiB
012.txt AC 334 ms 46508 KiB
013.txt AC 337 ms 46620 KiB
014.txt AC 301 ms 34140 KiB
015.txt AC 293 ms 16156 KiB
example0.txt AC 19 ms 8832 KiB
example1.txt AC 18 ms 8876 KiB
example2.txt AC 18 ms 8936 KiB