Solutions are presented as using the least memory and the fastest execution time. It also takes the top
10 most recent solutions from each language. If you want to limit to a specific index, click the
"Solved" button and go to that problem.
Problems
You are given integers N and D. Find N positive integers x1...xN such that the difference of their product and their sum equals D. The only line of input contains integers N (2 ≤ N ≤ 1000) and D (0 ≤ D ≤ 1000). Output N integers that satisfy the given condition in non-decreasing order (in a single line, separated with spaces). Note that some numbers can be equal. Numbers printed by you must not exceed 106. |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|
46398689 |
BlueDiamond |
E |
Nov. 30, 2018, 11:07 a.m. |
OK |
Picat |
TESTS |
18 |
15 |
0 |
|
1900 |
|
13907295 |
130705009 |
E |
Oct. 28, 2015, 1:46 a.m. |
OK |
Picat |
TESTS |
18 |
15 |
0 |
|
1900 |
|
10563364 |
Lollipop |
E |
April 3, 2015, 6:47 p.m. |
OK |
Picat |
TESTS |
18 |
15 |
0 |
|
1900 |
|
10512895 |
Farhod_Farmon |
E |
March 29, 2015, 8:11 a.m. |
OK |
Picat |
TESTS |
18 |
15 |
0 |
|
1900 |
|
10508153 |
akulinich beched |
E |
March 28, 2015, 7:28 p.m. |
OK |
Picat |
TESTS |
18 |
15 |
0 |
|
1900 |
|
10507814 |
minimario kuangbin |
E |
March 28, 2015, 7:16 p.m. |
OK |
Picat |
TESTS |
18 |
15 |
0 |
|
1900 |
|
10507625 |
Vanek VeoR12 |
E |
March 28, 2015, 7:09 p.m. |
OK |
Picat |
TESTS |
18 |
15 |
0 |
|
1900 |
|
10507505 |
pretorium |
E |
March 28, 2015, 7:04 p.m. |
OK |
Picat |
TESTS |
18 |
15 |
0 |
|
1900 |
|
10506895 |
minthe omse1998 |
E |
March 28, 2015, 6:41 p.m. |
OK |
Picat |
TESTS |
18 |
15 |
0 |
|
1900 |
|
10506518 |
Svyat |
E |
March 28, 2015, 6:28 p.m. |
OK |
Picat |
TESTS |
18 |
15 |
0 |
|
1900 |
remove filters
Back to search problems