結果

問題 No.2373 wa, wo, n
ユーザー miya145592miya145592
提出日時 2023-07-07 21:55:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 89 ms / 2,000 ms
コード長 334 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 87,184 KB
実行使用メモリ 76,348 KB
最終ジャッジ日時 2023-09-28 23:04:41
合計ジャッジ時間 5,159 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,128 KB
testcase_01 AC 73 ms
71,264 KB
testcase_02 AC 73 ms
71,308 KB
testcase_03 AC 74 ms
71,252 KB
testcase_04 AC 73 ms
71,284 KB
testcase_05 AC 72 ms
71,212 KB
testcase_06 AC 73 ms
71,440 KB
testcase_07 AC 71 ms
71,284 KB
testcase_08 AC 73 ms
71,528 KB
testcase_09 AC 73 ms
71,528 KB
testcase_10 AC 71 ms
71,288 KB
testcase_11 AC 73 ms
71,120 KB
testcase_12 AC 73 ms
71,220 KB
testcase_13 AC 71 ms
71,436 KB
testcase_14 AC 88 ms
76,124 KB
testcase_15 AC 85 ms
75,908 KB
testcase_16 AC 89 ms
76,200 KB
testcase_17 AC 86 ms
75,900 KB
testcase_18 AC 82 ms
75,724 KB
testcase_19 AC 73 ms
71,368 KB
testcase_20 AC 74 ms
71,432 KB
testcase_21 AC 72 ms
71,608 KB
testcase_22 AC 73 ms
71,268 KB
testcase_23 AC 73 ms
71,588 KB
testcase_24 AC 73 ms
71,368 KB
testcase_25 AC 74 ms
71,444 KB
testcase_26 AC 73 ms
71,368 KB
testcase_27 AC 73 ms
71,500 KB
testcase_28 AC 74 ms
71,252 KB
testcase_29 AC 74 ms
71,120 KB
testcase_30 AC 75 ms
71,540 KB
testcase_31 AC 72 ms
71,412 KB
testcase_32 AC 88 ms
76,348 KB
testcase_33 AC 74 ms
71,928 KB
testcase_34 AC 82 ms
75,944 KB
testcase_35 AC 74 ms
71,724 KB
testcase_36 AC 82 ms
76,200 KB
testcase_37 AC 79 ms
75,992 KB
testcase_38 AC 78 ms
75,884 KB
testcase_39 AC 78 ms
75,976 KB
testcase_40 AC 86 ms
76,284 KB
testcase_41 AC 87 ms
76,292 KB
testcase_42 AC 80 ms
76,068 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = input()
i = 0
while i<N:
    if i+1<N and S[i]=="w" and (S[i+1]=="a" or S[i+1]=="o" or S[i+1]=="?"):
        i+=2
    elif S[i]=="n":
        i+=1
    elif i+1<N and S[i]=="?" and (S[i+1]=="a" or S[i+1]=="o"):
        i+=2
    elif S[i]=="?":
        i+=1
    else:
        print("No")
        exit()
print("Yes")
0