結果
| 問題 | No.2373 wa, wo, n |
| コンテスト | |
| ユーザー |
ニックネーム
|
| 提出日時 | 2023-07-07 21:50:30 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 245 bytes |
| 記録 | |
| コンパイル時間 | 1,154 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 15,384 KB |
| 最終ジャッジ日時 | 2026-04-03 05:29:20 |
| 合計ジャッジ時間 | 10,358 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)
ニックネーム