結果
| 問題 |
No.2373 wa, wo, n
|
| コンテスト | |
| ユーザー |
lllllll88938494
|
| 提出日時 | 2023-07-07 21:33:10 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 762 bytes |
| コンパイル時間 | 322 ms |
| コンパイル使用メモリ | 82,500 KB |
| 実行使用メモリ | 74,164 KB |
| 最終ジャッジ日時 | 2024-07-21 17:16:28 |
| 合計ジャッジ時間 | 3,157 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 32 WA * 7 |
ソースコード
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()
lllllll88938494