結果
問題 |
No.3261 yiwiy9 → yiwiY9
|
ユーザー |
![]() |
提出日時 | 2025-09-06 13:24:16 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 929 bytes |
コンパイル時間 | 196 ms |
コンパイル使用メモリ | 82,572 KB |
実行使用メモリ | 74,716 KB |
最終ジャッジ日時 | 2025-09-06 13:24:41 |
合計ジャッジ時間 | 3,007 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 WA * 19 |
ソースコード
import sys, time, random, heapq, math, itertools, copy from collections import deque, Counter, defaultdict from bisect import bisect, bisect_left, bisect_right import heapq as hq from functools import cache, cmp_to_key def debug(*x):print('debug:',*x, file=sys.stderr) sys.setrecursionlimit(300000) input = lambda: sys.stdin.readline().rstrip() ii = lambda: int(input()) mi = lambda: map(int, input().split()) li = lambda: list(mi()) inf = 2 ** 61 - 1 mod = 998244353 dir = [(0, 1), (0, -1), (1, 0), (-1, 0)] H, W = mi() S = [list(input()) for _ in range(H)] for i in range(H): for j in range(len(S[i])): if S[i][j] == "y" : flg = False if j < len(S[i]) - 1 and S[i][j + 1] == "9": flg = True if j > 0 and S[i][j - 1] == "9": flg = True if flg: S[i][j] = "Y" for i in range(H): print("".join(S[i]))