結果

問題 No.993 青色
ユーザー 37zigen37zigen
提出日時 2020-02-21 22:10:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 606 bytes
コンパイル時間 2,004 ms
コンパイル使用メモリ 75,568 KB
実行使用メモリ 41,484 KB
最終ジャッジ日時 2024-04-17 07:40:22
合計ジャッジ時間 3,492 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
41,048 KB
testcase_01 AC 117 ms
41,168 KB
testcase_02 AC 122 ms
41,484 KB
testcase_03 AC 120 ms
41,224 KB
testcase_04 AC 105 ms
39,892 KB
testcase_05 AC 119 ms
41,132 KB
testcase_06 AC 112 ms
40,252 KB
testcase_07 AC 124 ms
41,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
import java.math.*;

class Main {
	public static void main(String[] args) throws Exception {
		new Main().run();
	}
	
	void run() {
		Scanner sc=new Scanner(System.in);
		char[] cs=sc.next().toCharArray();
		for(int i=0;i+1<cs.length;++i){
			if(cs[i]=='a'&&cs[i+1]=='o'){
				cs[i]='k';
				cs[i+1]='i';
			}
		}
		for(int i=0;i<cs.length;++i){
			System.out.print(cs[i]);
		}
		System.out.println();
	}

	static void tr(Object... objects) {
		System.out.println(Arrays.deepToString(objects));
	}

}
0