結果

問題 No.3261 yiwiy9 → yiwiY9
ユーザー Maeda
提出日時 2025-09-09 14:48:15
言語 Java
(openjdk 23)
結果
AC  
実行時間 421 ms / 2,000 ms
コード長 626 bytes
コンパイル時間 2,397 ms
コンパイル使用メモリ 76,608 KB
実行使用メモリ 46,020 KB
最終ジャッジ日時 2025-09-09 14:48:27
合計ジャッジ時間 10,369 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int h = scan.nextInt();
        int w = scan.nextInt();
        for(int i = 0 ; i < h ; i++){
        	String iwi = scan.next();
        	for(int j = 0 ; j < w ; j++){
        		if(iwi.charAt(j) == 'y' ){
        			System.out.print("yiwiY9");
        			j+=5;
        		}else if(iwi.charAt(j) == '9' ){
        			System.out.print("9Yiwiy");
        			j += 5;
        		}else{
        			System.out.print(".");
        		}
        	}
        	System.out.println("");
        }
    }
}
0