結果

問題 No.3261 yiwiy9 → yiwiY9
コンテスト
ユーザー programogumogu
提出日時 2025-09-06 16:34:17
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 237 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 250 ms
コンパイル使用メモリ 96,236 KB
実行使用メモリ 84,096 KB
最終ジャッジ日時 2026-07-14 21:27:10
合計ジャッジ時間 3,924 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10 WA * 19
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

h,w = map(int,input().split())
for j in range(h):
  t = list(input())
  for i in range(w):
    if t[i]=="y":
      if 0 <= i-1 and t[i-1]=="9":
        t[i] = "Y"
      if i+1 < w and t[i+1] == "9":
        t[i] = "Y"
  print("".join(t))
0