Counting Satellites
시간 제한1초메모리 제한1024 MB
k(최대 10^18)가 주어질 때, 부분수열로 SATELLITE를 정확히 k번 포함하는 5000자 이하의 대문자 문자열을 만든다.
문제
Nick likes satellites. He likes them so much that he looks for them everywhere. One day he found a string of letters and counted a lot of instances of the word "SATELLITE" among all subsequences of the string. However the next day he forgot this string. Can you help him construct such a string?
String is a subsequence of string if and only if it is possible to delete some (possibly zero) characters from to get . Two subsequences are considered different if some character at a given position in is deleted in one subsequence but not the other.
입력
The single line of input contains a single integer (, which is the number of instances of the word "SATELLITE" in the string Nick forgot.
출력
Output a string of at most uppercase letters. The string must have exactly instances of the word "SATELLITE" among all its subsequences. It can be proven that under the given constraints a solution always exists. Note that the length of the string does not have to be minimized.