結果
| 問題 |
No.2373 wa, wo, n
|
| コンテスト | |
| ユーザー |
ニックネーム
|
| 提出日時 | 2023-07-07 21:50:30 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 245 bytes |
| コンパイル時間 | 225 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 11,392 KB |
| 最終ジャッジ日時 | 2024-07-21 17:42:01 |
| 合計ジャッジ時間 | 4,125 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 31 WA * 8 |
ソースコード
n = int(input()); s = input()
i = 0; ans = "Yes"
while i<n:
if i==n-1 and s[i]=="?": i += 1
elif s[i]=="n" or s[i:i+2] in {"??","?n"}: i += 1
elif s[i:i+2] in {"wa","wo","w?","?a","?o"}: i += 2
else: ans = "No"; i += 1
print(ans)
ニックネーム