結果

問題 No.2373 wa, wo, n
ユーザー mo124121mo124121
提出日時 2023-07-07 21:39:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 93 ms / 2,000 ms
コード長 318 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 87,336 KB
実行使用メモリ 80,256 KB
最終ジャッジ日時 2023-09-28 22:40:04
合計ジャッジ時間 5,180 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,580 KB
testcase_01 AC 69 ms
71,384 KB
testcase_02 AC 67 ms
71,476 KB
testcase_03 AC 68 ms
71,140 KB
testcase_04 AC 71 ms
71,456 KB
testcase_05 AC 69 ms
71,596 KB
testcase_06 AC 71 ms
71,300 KB
testcase_07 AC 71 ms
71,460 KB
testcase_08 AC 72 ms
71,652 KB
testcase_09 AC 71 ms
71,660 KB
testcase_10 AC 68 ms
71,420 KB
testcase_11 AC 68 ms
71,300 KB
testcase_12 AC 69 ms
71,580 KB
testcase_13 AC 69 ms
71,376 KB
testcase_14 AC 88 ms
79,096 KB
testcase_15 AC 78 ms
76,680 KB
testcase_16 AC 90 ms
79,300 KB
testcase_17 AC 80 ms
76,872 KB
testcase_18 AC 79 ms
76,132 KB
testcase_19 AC 83 ms
76,992 KB
testcase_20 AC 88 ms
78,980 KB
testcase_21 AC 79 ms
77,144 KB
testcase_22 AC 83 ms
77,872 KB
testcase_23 AC 88 ms
79,540 KB
testcase_24 AC 69 ms
71,352 KB
testcase_25 AC 69 ms
71,600 KB
testcase_26 AC 68 ms
71,420 KB
testcase_27 AC 68 ms
71,360 KB
testcase_28 AC 70 ms
71,556 KB
testcase_29 AC 70 ms
71,444 KB
testcase_30 AC 69 ms
71,200 KB
testcase_31 AC 69 ms
71,300 KB
testcase_32 AC 93 ms
79,788 KB
testcase_33 AC 92 ms
80,072 KB
testcase_34 AC 86 ms
79,496 KB
testcase_35 AC 87 ms
80,256 KB
testcase_36 AC 87 ms
79,844 KB
testcase_37 AC 88 ms
79,784 KB
testcase_38 AC 87 ms
79,700 KB
testcase_39 AC 86 ms
79,516 KB
testcase_40 AC 91 ms
79,860 KB
testcase_41 AC 92 ms
79,828 KB
testcase_42 AC 84 ms
79,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = list(input())

for i in range(N - 1):
    if S[i] == "w" and S[i + 1] == "?":
        S[i + 1] = "a"
    if S[i + 1] in "oa" and S[i] == "?":
        S[i] = "w"

T = "".join(S)
if len(T.replace("wa", "").replace("wo", "").replace("n", "").replace("?", "")):
    print("No")
else:
    print("Yes")
0