問題一覧 > 通常問題

No.536 Artificial Intelligence

レベル : / AI推定難易度 : 101 / 実行時間制限 : 1ケース 1.000秒 / メモリ制限 : 128 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 658
作問者 : mai / テスター : くれちー
お気に入りにしたユーザー ProblemId : 1410 / 自分の提出
問題文最終更新日: 2026-07-03 11:41:21
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 168 (順位表) の他の問題:

Problem Statement

In a certain community, there is a custom that when naming an artificial intelligence, the AI's name is made by transforming the ID of its creator.

The creator's ID is a string of at least 2 and at most 10 characters consisting of lowercase letters.

  • If the last 2 characters of the creator's ID are ai, the AI's name is the creator's ID with its last 2 characters converted to uppercase.
  • If the creator's ID does not satisfy the above, the AI's name is the creator's ID with -AI appended to its end.

The creator's ID is given from standard input. Output the AI's name according to the custom.

Input

S

$S$ is the creator's ID.

$2 \le |S| \le 10$
The string $S$ consists of lowercase letters.

Output

Output the AI's name according to the custom described in the problem statement.

Print a newline at the end.

Sample

Sample 1
Input
samurai
Output
samurAI

The last 2 characters of the creator's ID are ai, so output the string obtained by converting the last 2 characters of the creator's ID to uppercase.

Sample 2
Input
yuki
Output
yuki-AI

The creator's ID does not end with ai, so output the string obtained by appending -AI to the end of the creator's ID.

Sample 3
Input
maibuyoh
Output
maibuyoh-AI

The string contains ai, but not at its end, so instead of converting the last 2 characters to uppercase, append -AI to the end.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。