AlgoUniversity
  • Go Back
Discussion
Consectuive Composite Integer :

Author

Akshay Sharma

Difficulty Level : Medium

Submissions : 119

Asked In : Mastercard

Marks :100

: 0 | : 1

Given a range L and R and an integer K find all the groups in the given range having at least K Consecutive integer

Input

The first line of input contains L, R,K ($$$ 1 \le L \le R \le 10^5 $$$)

Output

print all groups having K consecutive integers

Example

Input
500 650 10
Output
510 520 11
524 540 17
620 630 11

Note

For test case1:

The prime number between 500 to 600 are : (503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647)

So between them the consecutive composite number which are greater than K are 510-520,520-540 and 620-630.

You need to login to view your submissions.

You need to login to view all submissions.

Loading...

Result : Executed

Loading...

Feel something is wrong with the test cases?

Result : Accepted

Test Cases :

You need to Log In
We're glad that you want to attempt this problem!

But to Run or Submit the Problem, you need to Log In.

Continue to Log In
Challenge Submitted!

Your challenge has been submitted successfully.

You will get a response soon via WhatsApp or Email.

Challenge
Facing issue while trying to solve the problem! Don't worry, we got you covered!

Do let us know your issue.

Looks good!
Please enter your issue / feedback.

How do we get in touch with you?
Looks good!
Please enter your phone no.
Looks good!
Please enter your email address.