4317: 【入门】输出个位为5或者个位为8数

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:50 Solved:43

Description

请从小到大输出1~n中所有个位为5或者个位为8的所有的整数,每行1个。 比如,假设n=20,那么满足条件的数输出如下: 5 8 15 18

Input

一个整数n。

Output

1~n中所有满足条件的整数。

Sample Input Copy

25

Sample Output Copy

5
8
15
18
25

HINT

样例输入1: 20 样例输出1: 5 8 15 18 样例输入2: 30 样例输出2: 5 8 15 18 25 28 样例输入3: 25 样例输出3: 5 8 15 18 25