結果
問題 | No.536 人工知能 |
ユーザー |
|
提出日時 | 2017-06-30 22:22:25 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 135 ms / 1,000 ms |
コード長 | 691 bytes |
コンパイル時間 | 4,461 ms |
コンパイル使用メモリ | 75,716 KB |
実行使用メモリ | 54,184 KB |
最終ジャッジ日時 | 2024-10-04 19:06:40 |
合計ジャッジ時間 | 7,152 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
import java.io.*;import java.util.*;public class Main_yukicoder536 {private static Scanner sc;private static Printer pr;private static void solve() {char[] s = sc.next().toCharArray();int n = s.length;if (s[n - 2] == 'a' && s[n - 1] == 'i') {s[n - 2] = 'A';s[n - 1] = 'I';pr.println(s);} else {pr.print(s);pr.println("-AI");}}// ---------------------------------------------------public static void main(String[] args) {sc = new Scanner(System.in);pr = new Printer(System.out);solve();pr.close();sc.close();}private static class Printer extends PrintWriter {Printer(PrintStream out) {super(out);}}}