結果

問題 No.2373 wa, wo, n
ユーザー lllllll88938494lllllll88938494
提出日時 2023-07-07 21:33:10
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 762 bytes
コンパイル時間 517 ms
コンパイル使用メモリ 87,212 KB
実行使用メモリ 81,172 KB
最終ジャッジ日時 2023-09-28 22:31:37
合計ジャッジ時間 5,765 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,240 KB
testcase_01 AC 76 ms
71,084 KB
testcase_02 AC 75 ms
71,360 KB
testcase_03 AC 76 ms
71,464 KB
testcase_04 AC 75 ms
71,208 KB
testcase_05 AC 76 ms
71,348 KB
testcase_06 AC 77 ms
71,328 KB
testcase_07 AC 77 ms
71,308 KB
testcase_08 AC 75 ms
71,388 KB
testcase_09 AC 76 ms
71,304 KB
testcase_10 AC 75 ms
71,384 KB
testcase_11 AC 75 ms
71,300 KB
testcase_12 AC 78 ms
71,292 KB
testcase_13 AC 75 ms
71,484 KB
testcase_14 WA -
testcase_15 AC 75 ms
71,684 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 77 ms
72,340 KB
testcase_20 AC 79 ms
74,068 KB
testcase_21 AC 76 ms
72,556 KB
testcase_22 AC 78 ms
72,812 KB
testcase_23 AC 80 ms
74,744 KB
testcase_24 AC 73 ms
71,408 KB
testcase_25 AC 74 ms
71,092 KB
testcase_26 AC 74 ms
71,304 KB
testcase_27 AC 76 ms
71,272 KB
testcase_28 AC 75 ms
71,308 KB
testcase_29 AC 75 ms
71,208 KB
testcase_30 AC 77 ms
71,268 KB
testcase_31 AC 75 ms
71,348 KB
testcase_32 WA -
testcase_33 AC 81 ms
74,984 KB
testcase_34 AC 91 ms
81,172 KB
testcase_35 AC 81 ms
74,664 KB
testcase_36 AC 94 ms
80,660 KB
testcase_37 AC 88 ms
80,972 KB
testcase_38 AC 89 ms
80,984 KB
testcase_39 AC 89 ms
80,844 KB
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 91 ms
80,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

while True:
    if len(s) == 0:
        print('Yes')
        exit()
    if len(s) == 1:
        if s[0] == 'n' or s[0] == '?':
            print('Yes')
            exit()
        else:
            print('No')
            exit()

    else:
        f = 0
        if s[-1] == 'n':
            s.pop()
            f = 1
        elif (s[-1] == 'o' or s[-1] == '?') and (s[-2] == 'w' or s[-2] == '?'):
            s.pop()
            s.pop()
            f = 1
        elif (s[-1] == 'a' or s[-1] == '?') and (s[-2] == 'w' or s[-2] == '?'):
            s.pop()
            s.pop()
            f = 1

        elif s[-1] == '?':
            s.pop()
            f = 1
        if f == 0:
            print('No')
            exit()
        

0