結果
問題 |
No.2226 Hello, Forgotten World!
|
ユーザー |
![]() |
提出日時 | 2023-02-24 21:46:01 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 957 bytes |
コンパイル時間 | 210 ms |
コンパイル使用メモリ | 82,552 KB |
実行使用メモリ | 61,212 KB |
最終ジャッジ日時 | 2024-09-13 05:18:24 |
合計ジャッジ時間 | 1,135 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 9 |
ソースコード
import sys inputs = sys.stdin.readline """再帰関数のときセット sys.setrecursionlimit(10**7) import pypyjit pypyjit.set_param('max_unroll_recursion=-1') """ def main(): CONST = "helloworld" def solve(): N = int(inputs()) S = input() left, right = N - 10, N while left >= 0: is_ok = True for i in range(10): if S[left + i] == '?': continue if S[left + i] != CONST[i]: is_ok = False break if not is_ok: left -= 1 right -= 1 continue print(S[:left].replace('?', 'a') + CONST + S[right:].replace('?', 'a')) return print(-1) T = int(inputs()) for _ in range(T): solve() if __name__ == '__main__': main()