1368B.md (1185B)
1 Source: https://codeforces.com/problemset/problem/1368/B 2 3 B. Codeforces Subsequences 4 5 time limit per test 6 7 2 seconds 8 9 memory limit per test 10 11 512 megabytes 12 13 input 14 15 standard input 16 17 output 18 19 standard output 20 21 Karl likes Codeforces and subsequences. He wants to find a string of lowercase English letters that contains at least $k$ subsequences codeforces. Out of all possible strings, Karl wants to find a shortest one. 22 23 Formally, a codeforces subsequence of a string $s$ is a subset of ten characters of $s$ that read codeforces from left to right. For example, codeforces contains codeforces a single time, while codeforcesisawesome contains codeforces four times: codeforcesisawesome, codeforcesisawesome, codeforcesisawesome, codeforcesisawesome. 24 25 Help Karl find any shortest string that contains at least $k$ codeforces subsequences. 26 27 Input 28 29 The only line contains a single integer $k$ ($1 \leq k \leq 10^{16})$. 30 31 Output 32 33 Print a shortest string of lowercase English letters that contains at least $k$ codeforces subsequences. If there are several such strings, print any of them. 34 35 Examples 36 37 Input 38 39 ``` 40 1 41 ``` 42 43 Output 44 45 ``` 46 codeforces 47 ``` 48 49 Input 50 51 ``` 52 3 53 ``` 54 55 Output 56 57 ``` 58 codeforcesss 59 ```