結果

問題 No.536 人工知能
ユーザー kazapyon27kazapyon27
提出日時 2017-07-06 00:49:01
言語 Java21
(openjdk 21)
結果
AC  
実行時間 56 ms / 1,000 ms
コード長 463 bytes
コンパイル時間 4,601 ms
コンパイル使用メモリ 74,932 KB
実行使用メモリ 50,332 KB
最終ジャッジ日時 2024-04-15 18:25:58
合計ジャッジ時間 5,220 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
50,216 KB
testcase_01 AC 54 ms
50,176 KB
testcase_02 AC 54 ms
50,240 KB
testcase_03 AC 55 ms
50,024 KB
testcase_04 AC 54 ms
50,332 KB
testcase_05 AC 55 ms
49,944 KB
testcase_06 AC 56 ms
50,164 KB
testcase_07 AC 54 ms
49,896 KB
testcase_08 AC 54 ms
49,840 KB
testcase_09 AC 55 ms
50,180 KB
testcase_10 AC 54 ms
50,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/*No.536 人工知能*/
import java.io.*;
import java.util.regex.Pattern;
public class No536 {
	public static void main(String[] args) {
		try(BufferedReader input =new BufferedReader(new InputStreamReader(System.in))){
			String id =input.readLine();
			Pattern p =Pattern.compile("ai$");
			if(p.matcher(id).find()){
				System.out.println(id.replaceAll("ai$", "AI"));
			}else{
				System.out.println(id.concat("-AI"));
			}
		}catch(Exception e){
			
		}
	}
}
0