#P8846. 『JROI-7』PMK 配匹串符字
『JROI-7』PMK 配匹串符字
Background
The constraints are very loose, so the construction ends up being pretty dumb.
— command_block, "Pre-Exam Tips"
Problem Description
For a string , let denote the length of . Let denote the -th character of , and let denote the string formed by . Two strings are defined to be equal if and only if they have the same length and the characters at every position are the same.
For a string and a positive integer , if is the largest positive integer satisfying and , then . In particular, if no such exists, then .
Please construct a string consisting of lowercase letters such that , and the sum of over all positive integers is minimized.
Input Format
One line containing a positive integer .
Output Format
One line containing a string, representing the you construct. Output any valid solution.
5
abcde
Hint
Constraints
This problem uses bundled testdata.
For of the testdata, .
For of the testdata, .
Translated by ChatGPT 5