Universal Cup Judging System

Universal Cup

Límite de tiempo: 1.0 s Límite de memoria: 1024 MB Puntuación total: 100
Estadísticas

Alice 在職場拼搏多年,終於登上了最高峰。她剛剛成為一家大型上市公司的執行長(CEO)。前任 CEO 因財務表現不佳而被解僱,但 Alice 非常清楚如何提升利潤。是時候選擇一個新的公司名稱了!

投資人熱愛任何與人工智慧相關的詞彙,尤其是在公司名稱中。公司的基礎價值等於其名稱的長度,而子字串「AI」每出現一次,就會使公司的價值乘以 5。例如,名稱「AAICPCAIIA」的長度為 10,且包含兩次(加上底線的)「AI」:

  • $\operatorname{value}(\texttt{AAICPCAIIA}) = 10 \cdot 5 \cdot 5 = 250$

更多例子:

  • $\operatorname{value}(\texttt{AXI}) = 3$(「AI」出現 0 次)
  • $\operatorname{value}(\texttt{AIAIAIAI}) = 8 \cdot 5 \cdot 5 \cdot 5 \cdot 5 = 5000$(「AI」出現 4 次)
  • $\operatorname{value}(\texttt{AIMPPZ}) = 6 \cdot 5 = 30$(「AI」出現 1 次)

如果公司的價值恰好為 $n$,Alice 的合約保證她能獲得一筆極其豐厚的獎金。同時她也希望公司名稱越短越好。

Alice 已經開始忙於她的下一項任務——設計煥然一新的標誌。在此期間,你能提議一個新的公司名稱嗎?請找出一個由大寫英文字母 A-Z 組成、價值為 $n$ 且長度最短的單字。

輸入格式

唯一的一行包含一個整數 $n$ ($1 \le n \le 100\,000$) —— 期望的公司價值。

輸出格式

輸出一個由字母 A-Z 組成的單字 —— 一個價值為 $n$ 且可能長度最短的名稱。若存在多組解,輸出任意一組即可。

範例

輸入 1

30

輸出 1

AIMPPZ

輸入 2

250

輸出 2

AAICPCAIIA

說明

在第一個測試中,我們尋找價值為 30 的最短可能名稱。最佳單字的長度為 6 且包含一次「AI」,例如「AIMPPZ」、「HUAWAI」、「BRAINS」與「AAAIII」。沒有更短的單字具有 30 的價值。

在第二個測試中,無法以少於 10 個字元的名稱達成 250 的價值。

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.