結果
| 問題 |
No.1702 count good string
|
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2025-06-04 20:16:29 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 263 bytes |
| コンパイル時間 | 575 ms |
| コンパイル使用メモリ | 82,736 KB |
| 実行使用メモリ | 76,816 KB |
| 最終ジャッジ日時 | 2025-06-04 20:16:35 |
| 合計ジャッジ時間 | 4,850 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 WA * 42 |
ソースコード
N = int(input())
S = input()
dp = [1] + [0] * 9
dic = dict(zip("yukicoder",range(1,N+1)))
for s in S:
if s in dic:
a = dic[s]
dp[a] += dp[a-1]
if s == "?":
for i in reversed(range(1,10)):
dp[i] += dp[i-1]
print(dp[-1])
ntuda