結果

問題 No.3261 yiwiy9 → yiwiY9
コンテスト
ユーザー yamasakih
提出日時 2025-09-13 16:27:55
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 136 ms / 2,000 ms
+ 769µs
コード長 813 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 342 ms
コンパイル使用メモリ 21,412 KB
実行使用メモリ 19,960 KB
最終ジャッジ日時 2026-07-15 01:47:19
合計ジャッジ時間 6,756 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
from collections import *
from functools import cache, partial
from itertools import *
from pprint import pprint
from typing import Any, Final

try:
    from icecream import ic
except ImportError:  # Graceful fallback if IceCream isn't installed.
    ic = lambda *a: None if not a else (a[0] if len(a) == 1 else a)  # noqa
debug = partial(print, file=sys.stderr)
dpprint = partial(pprint, stream=sys.stderr)
sys.setrecursionlimit(10 ** 6)
MOD=998244353

H, W = map(int, input().split())
S = [input() for _ in range(H)]

for s in S:
    w = 0
    ns = ""
    while w < W:
        c = s[w]
        if c == ".":
            ns += "."
            w += 1
        elif c == "y":
            ns += "yiwiY9"
            w += 6
        elif c == "9":
            ns += "9Yiwiy"
            w += 6
    print(ns)
0