結果
問題 | No.2226 Hello, Forgotten World! |
ユーザー |
![]() |
提出日時 | 2023-03-01 11:07:55 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 499 bytes |
コンパイル時間 | 181 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 66,944 KB |
最終ジャッジ日時 | 2024-09-16 10:24:34 |
合計ジャッジ時間 | 1,465 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 9 |
ソースコード
h = 'helloworld'for _ in range(int(input())):n=int(input())s = list(input())for i in range(len(s) - len(h), -1, -1):flag = Truefor j in range(len(h)):if s[i + j] == '?' or s[i + j] == h[j]:continueelse:flag = Falseif flag:for j in range(len(h)):s[i + j] = h[j]ans = ''.join(s).replace('?', 'a')breakelse:ans=-1print(ans)