結果
| 問題 |
No.2226 Hello, Forgotten World!
|
| コンテスト | |
| ユーザー |
gr1msl3y
|
| 提出日時 | 2023-03-18 15:36:41 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 590 bytes |
| コンパイル時間 | 195 ms |
| コンパイル使用メモリ | 82,276 KB |
| 実行使用メモリ | 64,000 KB |
| 最終ジャッジ日時 | 2024-09-18 13:20:46 |
| 合計ジャッジ時間 | 1,342 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 9 |
ソースコード
T='helloworld'
def solve(N,S):
for i in range(N-10,-1,-1):
for j in range(10):
if S[i+j]!='?' and S[i+j]!=T[j]:
break
else:
res=[]
for j in range(N):
if i<=j<i+10:
res.append(T[j-i])
elif S[j]=='?':
res.append('a')
else:
res.append(S[j])
return ''.join(res)
return '-1'
t=int(input())
ans=[]
for _ in range(t):
N=int(input())
S=input()
ans.append(solve(N,S))
print(*ans,sep='\n')
gr1msl3y