結果

問題 No.536 人工知能
ユーザー aikon_marimoaikon_marimo
提出日時 2018-02-04 00:03:31
言語 Java21
(openjdk 21)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 393 bytes
コンパイル時間 3,583 ms
コンパイル使用メモリ 73,932 KB
実行使用メモリ 57,576 KB
最終ジャッジ日時 2023-09-03 23:37:55
合計ジャッジ時間 4,723 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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