結果
| 問題 |
No.2373 wa, wo, n
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-09 11:23:39 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 94 ms / 2,000 ms |
| コード長 | 272 bytes |
| コンパイル時間 | 81 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 12,836 KB |
| 最終ジャッジ日時 | 2024-12-15 23:52:06 |
| 合計ジャッジ時間 | 3,686 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 39 |
ソースコード
n=int(input())
s=list(input())
for i in range(n-1):
if s[i] == 'w' and s[i + 1] == '?':
s[i+1] = 'a'
if s[i+1] in 'oa' and s[i]=='?':
s[i]='w'
t=''.join(s)
if len(t.replace('wa','').replace('wo','').replace('n','').replace('?','')):
print('No')
else:
print('Yes')