#CCBCHBON0000013. Bỏ số chia hết cho 3 (Skip Multiples of Three in an Interval)
Bỏ số chia hết cho 3 (Skip Multiples of Three in an Interval)
Skip Multiples of Three in an Interval
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given integers , inspect every integer in inclusive interval . Skip multiples of 3 and print every remaining value on a separate line. Print nothing when none qualifies.
Input
One line contains with .
Output
Each nonmultiple of 3 on a separate line in increasing order.
Subtasks
-
Subtask 1 (20%): .
-
Subtask 2 (30%): .
-
Subtask 3 (50%): .
Examples
Example 1
Input:
2 7
Output:
2
4
5
7
Explanation:
Include both endpoints while skipping multiples of 3.
Example 2
Input:
3 3
Output:
Explanation:
Include both endpoints while skipping multiples of 3.