P1151 Subnumber Integers
Description
For a five-digit number $\overline{a_1a_2a_3a_4a_5}$, it can be split into three subnumbers:
$sub_1=\overline{a_1a_2a_3}$
$sub_2=\overline{a_2a_3a_4}$
$sub_3=\overline{a_3a_4a_5}$
For example, the five-digit number $20207$ can be split into
$sub_1=202$
$sub_2=020\ (=20)$
$sub_3=207$
Given a positive integer $K$, write a program to find all five-digit numbers between $10000$ and $30000$ inclusive such that their three subnumbers $sub_1, sub_2, sub_3$ are all divisible by $K$.
Input Format
A positive integer $K$.
Output Format
Output one qualifying five-digit number per line in increasing order. Do not output duplicates or miss any. If there is no solution, output `No`.
Explanation/Hint
$0