326-like Numbers

AtCoder
IDabc326_b
Time2000ms
Memory256MB
Difficulty
A **326-like number** is a three-digit positive integer where the product of the hundreds and tens digits equals the ones digit. For example, $326,400,144$ are 326-like numbers, while $623,777,429$ are not. Given an integer $N$, find the smallest 326-like number greater than or equal to $N$. It always exists under the constraints. ## Constraints * $100 \leq N \leq 919$ * $N$ is an integer. ## Input The input is given from Standard Input in the following format: $N$ [samples]
Samples
Input #1
320
Output #1
326

$320,321,322,323,324,325$ are not 326-like numbers, while $326$ is a 326-like number.
Input #2
144
Output #2
144

$144$ is a 326-like number.
Input #3
516
Output #3
600
API Response (JSON)
{
  "problem": {
    "name": "326-like Numbers",
    "description": {
      "content": "A **326-like number** is a three-digit positive integer where the product of the hundreds and tens digits equals the ones digit. For example, $326,400,144$ are 326-like numbers, while $623,777,429$ ar",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc326_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "A **326-like number** is a three-digit positive integer where the product of the hundreds and tens digits equals the ones digit.\nFor example, $326,400,144$ are 326-like numbers, while $623,777,429$ ar...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments