結果

問題 No.536 人工知能
ユーザー villachvillach
提出日時 2017-10-12 10:13:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 1,000 ms
コード長 349 bytes
コンパイル時間 3,592 ms
コンパイル使用メモリ 85,952 KB
実行使用メモリ 54,136 KB
最終ジャッジ日時 2024-04-28 17:01:27
合計ジャッジ時間 5,293 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
54,036 KB
testcase_01 AC 118 ms
54,016 KB
testcase_02 AC 102 ms
52,840 KB
testcase_03 AC 125 ms
53,960 KB
testcase_04 AC 114 ms
53,380 KB
testcase_05 AC 123 ms
54,004 KB
testcase_06 AC 127 ms
54,136 KB
testcase_07 AC 123 ms
54,020 KB
testcase_08 AC 124 ms
53,988 KB
testcase_09 AC 108 ms
52,932 KB
testcase_10 AC 122 ms
54,116 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class N536 {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		if(s.substring(s.length() - 2, s.length()).equals("ai")){
			System.out.println(s.substring(0, s.length() - 2) + "AI");
		}else{
			System.out.println(s + "-AI");
		}
	}
}
0