103261: [Atcoder]ABC326 B - 326-like Numbers
Description
Score : $200$ points
Problem Statement
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$
Output
Print the answer.
Sample Input 1
320
Sample Output 1
326
$320,321,322,323,324,325$ are not 326-like numbers, while $326$ is a 326-like number.
Sample Input 2
144
Sample Output 2
144
$144$ is a 326-like number.
Sample Input 3
516
Sample Output 3
600
Output
问题描述
一个326-like数是一个三位正整数,其中百位数和十位数的乘积等于个位数。
例如,326,400,144是326-like数,而623,777,429不是。
给定一个整数$N$,找到最小的326-like数,大于或等于$N$。在约束条件下,它总是存在的。
约束条件
- $100 \leq N \leq 919$
- $N$是一个整数。
输入
输入从标准输入以以下格式给出:
$N$
输出
打印答案。
样例输入1
320
样例输出1
326
$320,321,322,323,324,325$不是326-like数,而326是326-like数。
样例输入2
144
样例输出2
144
$144$是326-like数。
样例输入3
516
样例输出3
600