結果

問題 No.3261 yiwiy9 → yiwiY9
ユーザー おもち(求肥)
提出日時 2025-09-06 13:48:33
言語 Rust
(1.83.0 + proconio)
結果
RE  
実行時間 -
コード長 462 bytes
コンパイル時間 14,067 ms
コンパイル使用メモリ 387,948 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-09-06 13:49:05
合計ジャッジ時間 15,709 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27 RE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

use proconio::input;
fn main() {
  input!{
    h: usize,
    w: usize,
    mut s: [String; h]
  }
  for i in 0..h {
    let mut j = 0;
    while j <= w-6 {
        if &s[i][j..j+6] == "yiwiy9" {
            s[i].replace_range(j..j+6, "yiwiY9");
            j += 6;
        } else if &s[i][j..j+6] == "9yiwiy" {
            s[i].replace_range(j..j+6, "9Yiwiy");
            j+=6;
        } else {
            j+=1;
        }
    }
    println!("{}", s[i]);
  }
}
0