結果

問題 No.536 人工知能
ユーザー Pump0129Pump0129
提出日時 2018-03-27 10:05:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 1,000 ms
コード長 514 bytes
コンパイル時間 2,673 ms
コンパイル使用メモリ 73,896 KB
実行使用メモリ 56,224 KB
最終ジャッジ日時 2023-09-07 18:55:11
合計ジャッジ時間 4,399 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
56,024 KB
testcase_01 AC 122 ms
55,464 KB
testcase_02 AC 122 ms
53,620 KB
testcase_03 AC 122 ms
56,052 KB
testcase_04 AC 122 ms
55,800 KB
testcase_05 AC 121 ms
56,224 KB
testcase_06 AC 121 ms
56,084 KB
testcase_07 AC 119 ms
56,020 KB
testcase_08 AC 120 ms
56,004 KB
testcase_09 AC 118 ms
55,868 KB
testcase_10 AC 120 ms
55,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package net.ipipip0129.yukicoder.no536;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        String line = scan.nextLine();
        String name;
        if (line.substring(line.length() - 2, line.length()).equalsIgnoreCase("ai")) {
            name = line.substring(0, line.length() - 2) + "AI";
        } else {
            name = line + "-AI";
        }

        System.out.println(name);
    }
}
0