結果
問題 |
No.3261 yiwiy9 → yiwiY9
|
ユーザー |
👑 |
提出日時 | 2025-08-06 22:36:41 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 73 ms / 2,000 ms |
コード長 | 509 bytes |
コンパイル時間 | 319 ms |
コンパイル使用メモリ | 82,712 KB |
実行使用メモリ | 78,060 KB |
最終ジャッジ日時 | 2025-08-06 22:36:45 |
合計ジャッジ時間 | 3,339 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
H, W = map(int, input().split()) S = [list(input()) for _ in range(H)] checked = [[False] * W for _ in range(H)] for i in range(H): for j in range(W - 5): if checked[i][j]: continue if S[i][j : j + 6] == [*"yiwiy9"]: S[i][j : j + 6] = [*"yiwiY9"] checked[i][j : j + 6] = [True] * 6 elif S[i][j : j + 6] == [*"9yiwiy"]: S[i][j : j + 6] = [*"9Yiwiy"] checked[i][j : j + 6] = [True] * 6 for s in S: print("".join(s))