結果
| 問題 | No.3261 yiwiy9 → yiwiY9 |
| コンテスト | |
| ユーザー |
🦌せ
|
| 提出日時 | 2025-09-06 15:08:54 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 74 ms / 2,000 ms |
| + 966µs | |
| コード長 | 661 bytes |
| 記録 | |
| コンパイル時間 | 237 ms |
| コンパイル使用メモリ | 95,860 KB |
| 実行使用メモリ | 83,456 KB |
| 最終ジャッジ日時 | 2026-07-14 20:56:47 |
| 合計ジャッジ時間 | 4,046 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 |
ソースコード
h,w = map(int,input().split())
s = [list(input()) for _ in range(h)]
if w > 5:
for i in range(h):
k = 0
for j in range(w-5):
j += k
if j + 5 >= w:
break
if s[i][j] == "9" and s[i][j+1] == "y" and s[i][j+2] == "i" and s[i][j+3] == "w" and s[i][j+4] == "i" and s[i][j+5] == "y":
s[i][j+1] = "Y"
k += 5
if s[i][j] == "y" and s[i][j+1] == "i" and s[i][j+2] == "w" and s[i][j+3] == "i" and s[i][j+4] == "y" and s[i][j+5] == "9":
s[i][j+4] = "Y"
k += 5
for A in s:
t = ""
for B in A:
t += B
print(t)
🦌せ