結果
| 問題 | No.2373 wa, wo, n |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-09 11:23:39 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 63 ms / 2,000 ms |
| + 976µs | |
| コード長 | 272 bytes |
| 記録 | |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 13,084 KB |
| 最終ジャッジ日時 | 2026-10-04 06:19:03 |
| 合計ジャッジ時間 | 4,313 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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')