結果

問題 No.2373 wa, wo, n
ユーザー rlangevinrlangevin
提出日時 2023-07-07 21:47:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 94 ms / 2,000 ms
コード長 466 bytes
コンパイル時間 565 ms
コンパイル使用メモリ 87,188 KB
実行使用メモリ 81,600 KB
最終ジャッジ日時 2023-09-28 22:53:20
合計ジャッジ時間 5,600 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,584 KB
testcase_01 AC 68 ms
71,452 KB
testcase_02 AC 68 ms
71,360 KB
testcase_03 AC 71 ms
71,420 KB
testcase_04 AC 76 ms
71,332 KB
testcase_05 AC 70 ms
71,388 KB
testcase_06 AC 68 ms
71,572 KB
testcase_07 AC 68 ms
71,416 KB
testcase_08 AC 69 ms
71,568 KB
testcase_09 AC 69 ms
71,512 KB
testcase_10 AC 70 ms
71,296 KB
testcase_11 AC 75 ms
71,332 KB
testcase_12 AC 71 ms
71,548 KB
testcase_13 AC 74 ms
71,416 KB
testcase_14 AC 94 ms
80,408 KB
testcase_15 AC 76 ms
72,288 KB
testcase_16 AC 91 ms
80,668 KB
testcase_17 AC 80 ms
77,268 KB
testcase_18 AC 78 ms
76,080 KB
testcase_19 AC 72 ms
72,804 KB
testcase_20 AC 76 ms
75,612 KB
testcase_21 AC 71 ms
72,940 KB
testcase_22 AC 75 ms
74,064 KB
testcase_23 AC 78 ms
76,292 KB
testcase_24 AC 70 ms
71,384 KB
testcase_25 AC 72 ms
71,348 KB
testcase_26 AC 69 ms
71,404 KB
testcase_27 AC 71 ms
71,516 KB
testcase_28 AC 70 ms
71,496 KB
testcase_29 AC 72 ms
71,356 KB
testcase_30 AC 71 ms
71,572 KB
testcase_31 AC 73 ms
71,512 KB
testcase_32 AC 93 ms
81,600 KB
testcase_33 AC 80 ms
76,700 KB
testcase_34 AC 85 ms
81,060 KB
testcase_35 AC 77 ms
76,680 KB
testcase_36 AC 85 ms
81,232 KB
testcase_37 AC 84 ms
81,316 KB
testcase_38 AC 83 ms
81,156 KB
testcase_39 AC 81 ms
80,904 KB
testcase_40 AC 90 ms
81,488 KB
testcase_41 AC 91 ms
81,344 KB
testcase_42 AC 87 ms
81,324 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = list(input())
S.reverse()
S.append("#")
for i in range(N):
    if S[i] == "n":
        continue
    elif S[i] == "a" or S[i] == "o":
        if S[i + 1] == "w" or S[i + 1] == "?":
            S[i + 1] = "n"
            continue
        else:
            print("No")
            exit()
    elif S[i] == "?":
        if S[i + 1] == "w":
            S[i + 1] = "n"
        continue
    else:
        print("No")
        exit()
        
print("Yes")
0