結果
問題 | No.536 人工知能 |
ユーザー |
![]() |
提出日時 | 2017-07-17 19:14:34 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 134 ms / 1,000 ms |
コード長 | 388 bytes |
コンパイル時間 | 3,451 ms |
コンパイル使用メモリ | 75,000 KB |
実行使用メモリ | 41,324 KB |
最終ジャッジ日時 | 2024-10-08 07:03:58 |
合計ジャッジ時間 | 5,588 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
import java.util.Scanner;public class N536 {public static void main(String[] args){Scanner sc=new Scanner(System.in);String S=sc.next();int l=S.length();StringBuilder sb=new StringBuilder();sb.append(S);if(S.substring(l-2,l).equals("ai")){sb.replace(l-2, l, "AI");}else{sb.append("-AI");}S=sb.toString();System.out.println(S);}}