AABCDDEFE

AtCoder
IDarc153_a
Time2000ms
Memory256MB
Difficulty
A positive integer $x$ is said to be a **beautiful integer** if and only if $x$ is a $9$\-digit integer whose decimal notation $S_1\ldots S_9$ ($S_i$ is the $i$\-th character) satisfies all of the following conditions: * $S_1$ is not `0`, * $S_1 = S_2$, * $S_5 = S_6$, and * $S_7 = S_9$. For instance, $998244353$ and $333333333$ are beautiful integers, while $111112222$ is not, since $S_5 \neq S_6$. You are given a positive integer $N$. Print the $N$\-th smallest beautiful integer. ## Constraints * $N$ is a positive integer. * There are at least $N$ beautiful integers. ## Input The input is given from Standard Input in the following format: $N$ [samples]
Samples
Input #1
3
Output #1
110000020

The beautiful integers in ascending order are $110000000, 110000010, 110000020, \ldots$.
Input #2
882436
Output #2
998244353
Input #3
2023
Output #3
110200222
API Response (JSON)
{
  "problem": {
    "name": "AABCDDEFE",
    "description": {
      "content": "A positive integer $x$ is said to be a **beautiful integer** if and only if $x$ is a $9$\\-digit integer whose decimal notation $S_1\\ldots S_9$ ($S_i$ is the $i$\\-th character) satisfies all of the fol",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "arc153_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "A positive integer $x$ is said to be a **beautiful integer** if and only if $x$ is a $9$\\-digit integer whose decimal notation $S_1\\ldots S_9$ ($S_i$ is the $i$\\-th character) satisfies all of the fol...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments