結果

問題 No.536 人工知能
ユーザー snrnsidy
提出日時 2021-12-11 02:46:00
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 308 bytes
コンパイル時間 1,752 ms
コンパイル使用メモリ 192,648 KB
最終ジャッジ日時 2025-01-26 07:39:29
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
 
using namespace std;

int main(void) 
{
  cin.tie(0);
  ios::sync_with_stdio(false);

  string s;

  cin >> s;

  int n = s.length();

  if(s[n-2]=='a' && s[n-1]=='i')
  {
    s[n-2] = 'A';
    s[n-1] = 'I';
  }
  else
  {
    s += "-AI";
  }

  cout << s << '\n';
  
  return 0;
}
0