結果

問題 No.2373 wa, wo, n
ユーザー ikomaikoma
提出日時 2023-07-07 21:40:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 96 ms / 2,000 ms
コード長 424 bytes
コンパイル時間 771 ms
コンパイル使用メモリ 87,112 KB
実行使用メモリ 77,128 KB
最終ジャッジ日時 2023-09-28 22:42:03
合計ジャッジ時間 5,556 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,440 KB
testcase_01 AC 74 ms
71,232 KB
testcase_02 AC 76 ms
71,244 KB
testcase_03 AC 74 ms
71,248 KB
testcase_04 AC 77 ms
71,264 KB
testcase_05 AC 76 ms
71,224 KB
testcase_06 AC 75 ms
71,524 KB
testcase_07 AC 75 ms
71,360 KB
testcase_08 AC 76 ms
71,296 KB
testcase_09 AC 76 ms
71,144 KB
testcase_10 AC 76 ms
71,448 KB
testcase_11 AC 76 ms
71,340 KB
testcase_12 AC 75 ms
71,028 KB
testcase_13 AC 75 ms
71,440 KB
testcase_14 AC 95 ms
76,860 KB
testcase_15 AC 88 ms
75,788 KB
testcase_16 AC 93 ms
77,000 KB
testcase_17 AC 91 ms
75,920 KB
testcase_18 AC 86 ms
75,908 KB
testcase_19 AC 75 ms
71,432 KB
testcase_20 AC 76 ms
71,816 KB
testcase_21 AC 75 ms
71,428 KB
testcase_22 AC 75 ms
71,236 KB
testcase_23 AC 75 ms
71,668 KB
testcase_24 AC 74 ms
71,452 KB
testcase_25 AC 75 ms
71,380 KB
testcase_26 AC 74 ms
71,468 KB
testcase_27 AC 75 ms
71,548 KB
testcase_28 AC 76 ms
71,316 KB
testcase_29 AC 74 ms
71,548 KB
testcase_30 AC 74 ms
71,416 KB
testcase_31 AC 75 ms
71,432 KB
testcase_32 AC 96 ms
77,116 KB
testcase_33 AC 76 ms
71,440 KB
testcase_34 AC 78 ms
76,028 KB
testcase_35 AC 75 ms
71,920 KB
testcase_36 AC 89 ms
76,924 KB
testcase_37 AC 84 ms
76,392 KB
testcase_38 AC 84 ms
76,384 KB
testcase_39 AC 81 ms
76,112 KB
testcase_40 AC 96 ms
77,128 KB
testcase_41 AC 94 ms
77,036 KB
testcase_42 AC 83 ms
76,020 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())

S=input().strip()

w=0
q=0
for s in S:
    if s=="?":
        if w==0:
            q=1
        w=0
        continue
    if s=="w":
        if w==0:
            w=1
            q=0
            continue
    if s in ["a","o"]:
        if w or q:
            w=0
            q=0
            continue
    if s=="n":
        if w==0:continue
    print("No")
    exit()
if w:
    print("No")
    exit()
print("Yes")
0