結果

問題 No.2373 wa, wo, n
ユーザー ohanaohana
提出日時 2023-10-20 10:14:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 88 ms / 2,000 ms
コード長 337 bytes
コンパイル時間 315 ms
コンパイル使用メモリ 81,716 KB
実行使用メモリ 75,256 KB
最終ジャッジ日時 2023-10-20 10:14:10
合計ジャッジ時間 4,910 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,420 KB
testcase_01 AC 39 ms
53,420 KB
testcase_02 AC 38 ms
53,420 KB
testcase_03 AC 39 ms
53,420 KB
testcase_04 AC 38 ms
53,420 KB
testcase_05 AC 44 ms
53,420 KB
testcase_06 AC 38 ms
53,420 KB
testcase_07 AC 39 ms
53,420 KB
testcase_08 AC 39 ms
53,420 KB
testcase_09 AC 38 ms
53,420 KB
testcase_10 AC 38 ms
53,420 KB
testcase_11 AC 38 ms
53,420 KB
testcase_12 AC 38 ms
53,420 KB
testcase_13 AC 38 ms
53,420 KB
testcase_14 AC 57 ms
72,292 KB
testcase_15 AC 49 ms
63,852 KB
testcase_16 AC 58 ms
72,388 KB
testcase_17 AC 50 ms
63,848 KB
testcase_18 AC 46 ms
61,800 KB
testcase_19 AC 39 ms
53,420 KB
testcase_20 AC 39 ms
53,720 KB
testcase_21 AC 38 ms
53,420 KB
testcase_22 AC 39 ms
53,420 KB
testcase_23 AC 39 ms
53,772 KB
testcase_24 AC 39 ms
53,420 KB
testcase_25 AC 38 ms
53,420 KB
testcase_26 AC 39 ms
53,420 KB
testcase_27 AC 38 ms
53,420 KB
testcase_28 AC 37 ms
53,420 KB
testcase_29 AC 38 ms
53,420 KB
testcase_30 AC 38 ms
53,420 KB
testcase_31 AC 40 ms
53,420 KB
testcase_32 AC 88 ms
73,004 KB
testcase_33 AC 39 ms
53,800 KB
testcase_34 AC 64 ms
75,256 KB
testcase_35 AC 38 ms
53,800 KB
testcase_36 AC 53 ms
70,220 KB
testcase_37 AC 50 ms
70,220 KB
testcase_38 AC 51 ms
70,220 KB
testcase_39 AC 54 ms
72,208 KB
testcase_40 AC 56 ms
72,432 KB
testcase_41 AC 57 ms
72,428 KB
testcase_42 AC 50 ms
70,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
s = input()


i = 0

while i < n:
    if (
        i + 1 < n
        and s[i] in {"?", "w"}
        and s[i + 1] in {"?", "a", "o"}
        and s[i] != s[i + 1]
    ):
        i += 2
    elif s[i] in {"n", "?"}:
        i += 1
    else:
        # print(i, s[i], s[i + 1])
        print("No")
        exit()
print("Yes")
0