結果

問題 No.536 人工知能
ユーザー hjdhse79454gfehhjdhse79454gfeh
提出日時 2017-07-10 19:16:38
言語 Java21
(openjdk 21)
結果
AC  
実行時間 61 ms / 1,000 ms
コード長 574 bytes
コンパイル時間 2,240 ms
コンパイル使用メモリ 82,680 KB
実行使用メモリ 37,384 KB
最終ジャッジ日時 2024-04-16 12:32:30
合計ジャッジ時間 3,512 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
37,008 KB
testcase_01 AC 57 ms
37,384 KB
testcase_02 AC 60 ms
37,180 KB
testcase_03 AC 59 ms
36,880 KB
testcase_04 AC 58 ms
37,184 KB
testcase_05 AC 59 ms
36,860 KB
testcase_06 AC 57 ms
37,348 KB
testcase_07 AC 58 ms
37,204 KB
testcase_08 AC 61 ms
37,276 KB
testcase_09 AC 60 ms
37,256 KB
testcase_10 AC 59 ms
37,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main {
    public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();
        if(line.endsWith("ai")){
            for(int i = 0; i < 2; i++){
                line = line.substring(0, line.length()-1);
            }
            System.out.println(line + "AI");
        }else{
            System.out.println(line + "-AI");
        }
        
    }
}
0