結果

問題 No.2373 wa, wo, n
ユーザー shogo314shogo314
提出日時 2023-07-07 21:39:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 96 ms / 2,000 ms
コード長 539 bytes
コンパイル時間 286 ms
コンパイル使用メモリ 86,888 KB
実行使用メモリ 76,828 KB
最終ジャッジ日時 2023-09-28 22:41:10
合計ジャッジ時間 5,291 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,384 KB
testcase_01 AC 75 ms
71,512 KB
testcase_02 AC 75 ms
71,236 KB
testcase_03 AC 76 ms
71,356 KB
testcase_04 AC 75 ms
71,364 KB
testcase_05 AC 74 ms
71,236 KB
testcase_06 AC 74 ms
71,224 KB
testcase_07 AC 75 ms
71,316 KB
testcase_08 AC 74 ms
71,532 KB
testcase_09 AC 75 ms
71,340 KB
testcase_10 AC 72 ms
71,112 KB
testcase_11 AC 72 ms
71,604 KB
testcase_12 AC 73 ms
71,412 KB
testcase_13 AC 74 ms
71,176 KB
testcase_14 AC 96 ms
76,608 KB
testcase_15 AC 89 ms
75,708 KB
testcase_16 AC 95 ms
76,728 KB
testcase_17 AC 90 ms
75,880 KB
testcase_18 AC 84 ms
75,676 KB
testcase_19 AC 73 ms
71,412 KB
testcase_20 AC 75 ms
71,548 KB
testcase_21 AC 74 ms
71,388 KB
testcase_22 AC 73 ms
71,388 KB
testcase_23 AC 73 ms
71,532 KB
testcase_24 AC 71 ms
71,356 KB
testcase_25 AC 72 ms
71,356 KB
testcase_26 AC 73 ms
71,352 KB
testcase_27 AC 72 ms
71,396 KB
testcase_28 AC 73 ms
71,544 KB
testcase_29 AC 72 ms
71,564 KB
testcase_30 AC 72 ms
71,232 KB
testcase_31 AC 73 ms
71,052 KB
testcase_32 AC 94 ms
76,760 KB
testcase_33 AC 72 ms
71,940 KB
testcase_34 AC 78 ms
75,748 KB
testcase_35 AC 74 ms
71,536 KB
testcase_36 AC 88 ms
76,644 KB
testcase_37 AC 82 ms
76,104 KB
testcase_38 AC 83 ms
75,980 KB
testcase_39 AC 78 ms
75,936 KB
testcase_40 AC 95 ms
76,828 KB
testcase_41 AC 95 ms
76,600 KB
testcase_42 AC 83 ms
76,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = input()
l = ''
for c in S:
    if c == 'w':
        if l == '' or l == '?':
            l = 'w'
        else:
            break
    elif c == 'n':
        if l == '' or l == '?':
            l = ''
    elif c == '?':
        if l == '' or l == '?':
            l = '?'
        elif l=='w':
            l=''
    elif c == 'a' or c == 'o':
        if l == 'w' or l == '?':
            l = ''
        else:
            break
    else:
        break
else:
    if l != 'w':
        print('Yes')
        exit(0)
print('No')
0