結果

問題 No.536 人工知能
ユーザー matsuyoshi30matsuyoshi30
提出日時 2018-04-18 23:29:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 1,000 ms
コード長 338 bytes
コンパイル時間 2,579 ms
コンパイル使用メモリ 72,832 KB
実行使用メモリ 56,356 KB
最終ジャッジ日時 2023-09-09 11:30:04
合計ジャッジ時間 5,040 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
56,028 KB
testcase_01 AC 118 ms
55,680 KB
testcase_02 AC 119 ms
55,848 KB
testcase_03 AC 118 ms
55,756 KB
testcase_04 AC 118 ms
55,776 KB
testcase_05 AC 119 ms
55,812 KB
testcase_06 AC 119 ms
55,900 KB
testcase_07 AC 118 ms
55,564 KB
testcase_08 AC 118 ms
56,356 KB
testcase_09 AC 118 ms
55,612 KB
testcase_10 AC 118 ms
55,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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

        if(s.substring(s.length()-2).equals("ai"))
            System.out.println(s.substring(0, s.length()-2) + "AI");
        else
            System.out.println(s + "-AI");
    }
}
0