#B3934. Three-Digit Multiples
Three-Digit Multiples
Three-Digit Multiples
bj12z_jiasiyuan wants you to output all three-digit numbers that satisfy the following conditions. Let (a), (b), and (c) be the hundreds, tens, and ones digits respectively. The conditions are:
1. (a) is a digit from 1 to 9, while (b) and (c) are digits from 0 to 9.
2. The number formed by the digits (a) and (b), i.e. (10a+b), is a multiple of (k).
3. The number formed by the digits (b) and (c), i.e. (10b+c), is a multiple of (k).
4. The three-digit number (100a+10b+c) is also a multiple of (k).
You are required to output all such three-digit numbers in ascending order, one per line. If no such number exists, output a single line containing None!
.
inputFormat
The input consists of a single integer (k) on one line.
outputFormat
Output each qualifying three-digit number on a separate line in ascending order. If there is no such number, output None!
.
sample
5
100
105
150
155
200
205
250
255
300
305
350
355
400
405
450
455
500
505
550
555
600
605
650
655
700
705
750
755
800
805
850
855
900
905
950
955
</p>