Universal Cup Judging System

Universal Cup

Time Limit: 1.0 s Memory Limit: 1024 MB Total points: 100
Statistics

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.