結果

問題 No.536 人工知能
ユーザー tsunabittsunabit
提出日時 2018-07-04 19:27:48
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 1,000 ms
コード長 472 bytes
コンパイル時間 3,603 ms
コンパイル使用メモリ 74,800 KB
実行使用メモリ 56,124 KB
最終ジャッジ日時 2023-09-13 17:34:49
合計ジャッジ時間 5,487 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
56,124 KB
testcase_01 AC 120 ms
55,632 KB
testcase_02 AC 120 ms
55,964 KB
testcase_03 AC 116 ms
55,608 KB
testcase_04 AC 118 ms
55,812 KB
testcase_05 AC 121 ms
55,804 KB
testcase_06 AC 115 ms
56,084 KB
testcase_07 AC 120 ms
55,884 KB
testcase_08 AC 115 ms
55,868 KB
testcase_09 AC 119 ms
55,760 KB
testcase_10 AC 121 ms
55,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.util.stream.Stream;
import java.time.*;
import java.time.format.*;

public class No536 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
		String s = sc.next();
		if(s.charAt(s.length()-2) == 'a' && s.charAt(s.length()-1) == 'i') {
			for(int i = 0; i < s.length() - 2; i++) {
				System.out.print(s.charAt(i));
			}
			System.out.println("AI");
		}else {
			System.out.println(s + "-AI");
		}
	}
}
0