結果

問題 No.1702 count good string
ユーザー sasa8uyauyasasa8uyauya
提出日時 2024-08-08 20:07:56
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 218 bytes
コンパイル時間 491 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 76,672 KB
最終ジャッジ日時 2024-08-08 20:08:02
合計ジャッジ時間 5,741 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6 WA * 41
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
s=input()
t="yukicoder"
m=len(t)
M=10**9+7
q=[0]*m
for c in s:
  for i in reversed(range(1,m)):
    if c==t[i] or c=="?":
      q[i]+=q[i-1]
      q[i]%=M
  if c==t[0] or c=="?":
    q[0]+=1
print(q[-1])
0