Decreasing Digit Sums

AtCoder
IDagc066_b
Time2000ms
Memory256MB
Difficulty
For a positive integer $x$, let $f(x)$ denote the sum of its digits. For example, $f(331)=3+3+1=7$, $f(2024)=2+0+2+4=8$, and $f(1)=1$. You are given a positive integer $N$. Print a positive integer $x$ that satisfies all of the following conditions: * $1\leq x< 10^{10000}$ * $f(2^{i-1}x)>f(2^ix)$ for all integers $1\leq i\leq N$. ## Constraints * $1\leq N\leq 50$ ## Input The input is given from Standard Input in the following format: $N$ [samples]
Samples
Input #1
3
Output #1
89

For $x=89$, it follows from $f(x)=17$, $f(2x)=16$, $f(4x)=14$, and $f(8x)=10$ that $f(x)>f(2x)>f(4x)>f(8x)$, satisfying the conditions.
Some other integers that satisfy the conditions are $x=539$ and $x=890$.
API Response (JSON)
{
  "problem": {
    "name": "Decreasing Digit Sums",
    "description": {
      "content": "For a positive integer $x$, let $f(x)$ denote the sum of its digits. For example, $f(331)=3+3+1=7$, $f(2024)=2+0+2+4=8$, and $f(1)=1$. You are given a positive integer $N$. Print a positive integer $x",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "agc066_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "For a positive integer $x$, let $f(x)$ denote the sum of its digits. For example, $f(331)=3+3+1=7$, $f(2024)=2+0+2+4=8$, and $f(1)=1$.\nYou are given a positive integer $N$. Print a positive integer $x...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments