結果

問題 No.536 人工知能
ユーザー syuki791syuki791
提出日時 2017-07-01 21:16:52
言語 Java21
(openjdk 21)
結果
AC  
実行時間 143 ms / 1,000 ms
コード長 374 bytes
コンパイル時間 2,342 ms
コンパイル使用メモリ 76,500 KB
実行使用メモリ 54,320 KB
最終ジャッジ日時 2024-04-15 08:11:07
合計ジャッジ時間 4,571 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
54,236 KB
testcase_01 AC 136 ms
54,320 KB
testcase_02 AC 134 ms
54,316 KB
testcase_03 AC 141 ms
54,140 KB
testcase_04 AC 143 ms
54,120 KB
testcase_05 AC 138 ms
53,812 KB
testcase_06 AC 134 ms
54,088 KB
testcase_07 AC 137 ms
54,176 KB
testcase_08 AC 135 ms
53,908 KB
testcase_09 AC 134 ms
54,148 KB
testcase_10 AC 134 ms
54,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		
		Scanner s = new Scanner(System.in);
	String str = s.next();
	s.close();
		String sub = str.substring(str.length()-2);
		String ai;
		if(sub.equalsIgnoreCase("AI")){
			ai = str.substring(0, str.length()-2)+"AI";
		}else{
			ai = str+"-AI";
		}
		
		System.out.println(ai);
	}

}
0