結果
| 問題 |
No.2226 Hello, Forgotten World!
|
| コンテスト | |
| ユーザー |
Kude
|
| 提出日時 | 2023-02-24 21:56:22 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 431 bytes |
| コンパイル時間 | 462 ms |
| コンパイル使用メモリ | 81,976 KB |
| 実行使用メモリ | 60,436 KB |
| 最終ジャッジ日時 | 2024-09-13 05:26:59 |
| 合計ジャッジ時間 | 1,145 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 9 |
ソースコード
HW = 'helloworld'
for _ in range(int(input())):
n = int(input())
s = input()
if HW in s:
print(s.replace('?', 'a'))
continue
for i in range(n - 10, -1, -1):
for k in range(10):
if s[i + k] != '?' and s[i + k] != HW[k]:
break
else:
print(s[:i].replace('?', 'a') + HW + s[i + 10:].replace('?', 'a'))
break
else:
print(-1)
Kude