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번 등장)

Alice의 계약서는 회사의 가치가 정확히 $n$일 경우 매우 후한 보너스를 보장합니다. 또한 그녀는 회사 이름이 가능한 한 짧기를 원합니다.

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인 더 짧은 단어는 없습니다.

두 번째 테스트에서 가치 250은 10글자보다 짧은 이름으로는 달성할 수 없습니다.

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.