結果

問題 No.536 人工知能
ユーザー jimanojimano
提出日時 2018-01-26 22:26:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 55 ms / 1,000 ms
コード長 494 bytes
コンパイル時間 3,713 ms
コンパイル使用メモリ 83,316 KB
実行使用メモリ 49,896 KB
最終ジャッジ日時 2023-08-27 19:20:18
合計ジャッジ時間 4,938 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
49,736 KB
testcase_01 AC 53 ms
49,692 KB
testcase_02 AC 54 ms
49,560 KB
testcase_03 AC 53 ms
49,720 KB
testcase_04 AC 53 ms
49,704 KB
testcase_05 AC 54 ms
49,804 KB
testcase_06 AC 55 ms
49,648 KB
testcase_07 AC 53 ms
49,700 KB
testcase_08 AC 54 ms
49,684 KB
testcase_09 AC 53 ms
49,652 KB
testcase_10 AC 53 ms
49,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No0536 {
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			String input = br.readLine();

			String ans = input.endsWith("ai") ? input.substring(0, input.lastIndexOf("ai")) + "AI" : input + "-AI";

			System.out.println(ans);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
0