2771 - 2023GEC1506-0410-Practice Scoreboard

Time

2023/04/10 12:30:00 2023/04/10 18:00:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
13164 Ignore multiples

13164 - Ignore multiples   

Description

Given a boundary with numbers and several condition numbers,

generate a list of numbers within the given boundary, but without the multiples of condition numbers.

Input

The input is only one line and consists of two parts, which are 2 boundary numbers and 2 constrained numbers, with the following syntax:

0,20,3,7

  1. The first two are the boundary numbers which indicates the lower bound is 0 and the upper bound is 20.
  2. The last two are the constrained numbers which are 3 and 7.
  3. All the numbers are integers.

 

With the input, you need to generate a list of integers within the boundary of 0 and 20. (20 is excluded!)

Note that the generated list MUST avoid all the multiples of the constrained numbers which are 3 and 7 (e.x. 0, 3, 6, 7, 9 ... should be avoided as they are the multiples of 3 OR 7)

Output

The output is the generated list that formated with a "comma" between each element.

Note that the output list of numbers should be in ascending order.

Sample Input  Download

Sample Output  Download

Tags




Discuss