結果

問題 No.3261 yiwiy9 → yiwiY9
ユーザー Kazu
提出日時 2025-09-07 11:12:01
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 334 bytes
コンパイル時間 390 ms
コンパイル使用メモリ 82,044 KB
実行使用メモリ 78,212 KB
最終ジャッジ日時 2025-09-07 11:12:05
合計ジャッジ時間 3,975 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

import re


H, W = map(int, input().split())

grid = []

for _ in range(H):
    s = input()
    for c in s:
        if c == '.':
            continue
        if c == '9':
            s = re.sub("9yiwiy", "9Yiwiy", s)
        elif c == 'y':
            s = re.sub("yiwiy9", "yiwiY9", s)
    grid.append(s)

for g in grid:
    print(g)
0