結果

問題 No.536 人工知能
ユーザー bellbell
提出日時 2021-02-20 20:32:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 139 ms / 1,000 ms
コード長 297 bytes
コンパイル時間 2,341 ms
コンパイル使用メモリ 76,592 KB
実行使用メモリ 57,600 KB
最終ジャッジ日時 2023-10-19 01:02:03
合計ジャッジ時間 4,648 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
57,184 KB
testcase_01 AC 131 ms
57,240 KB
testcase_02 AC 131 ms
57,392 KB
testcase_03 AC 126 ms
57,436 KB
testcase_04 AC 124 ms
57,600 KB
testcase_05 AC 131 ms
57,440 KB
testcase_06 AC 127 ms
57,464 KB
testcase_07 AC 133 ms
57,424 KB
testcase_08 AC 134 ms
57,480 KB
testcase_09 AC 135 ms
57,452 KB
testcase_10 AC 139 ms
57,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

	import java.util.*;

	public class Main {
		public static void main(String[] args) {
			Scanner sc = new Scanner(System.in);
			String s = sc.next();
			sc.close();
			if( s.endsWith("ai")){
				System.out.println(s.replaceAll("ai$", "AI"));
			}else{
				System.out.println(s+"-AI");
			}
		}
	}
0