結果
問題 | No.2226 Hello, Forgotten World! |
ユーザー | nephrologist |
提出日時 | 2023-02-25 18:20:05 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 697 bytes |
コンパイル時間 | 483 ms |
コンパイル使用メモリ | 86,904 KB |
実行使用メモリ | 76,664 KB |
最終ジャッジ日時 | 2023-10-11 15:23:58 |
合計ジャッジ時間 | 2,095 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
ソースコード
import sys input = sys.stdin.readline hoge = list("helloworld") t = int(input()) for _ in range(t): n = int(input()) s = list(input()) if n < 10: print(-1) continue ans = -1 for start in range(n - 10): okflag = 1 for i in range(10): if s[start + i] == hoge[i] or s[start + i] == "?": continue else: okflag = 0 break if okflag: ans = start if ans == -1: print(ans) continue for i in range(10): s[ans + i] = hoge[i] for i in range(n): if s[i] == "?": s[i] = "a" print("".join(s)) # exit()