結果

問題 No.536 人工知能
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2017-06-30 22:23:36
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 429 bytes
コンパイル時間 2,218 ms
コンパイル使用メモリ 76,432 KB
実行使用メモリ 54,348 KB
最終ジャッジ日時 2024-04-15 06:03:07
合計ジャッジ時間 3,764 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 122 ms
54,012 KB
testcase_02 AC 122 ms
54,104 KB
testcase_03 RE -
testcase_04 WA -
testcase_05 AC 119 ms
54,052 KB
testcase_06 WA -
testcase_07 AC 120 ms
54,328 KB
testcase_08 WA -
testcase_09 AC 121 ms
54,036 KB
testcase_10 AC 110 ms
53,032 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        solve(S);
    }
    static void solve(String S){
        int N = S.length();
        if(S.charAt(N-2)=='a'&&S.charAt(N-1)=='i'){
            System.out.println(S.substring(0,N-3)+"AI");
        }else{
            System.out.println(S+"-AI");
        }
    }
}
0