Cody

# Problem 42581. Create sequnce 1 4 9 16 25.........

Solution 1966182

Submitted on 7 Oct 2019
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
x = 25; y_correct = [1 4 9 16 25]; assert(isequal(prntseq(x),y_correct))

y = [] y = 1 y = 1 4 y = 1 4 9 y = 1 4 9 16 y = 1 4 9 16 25 y = 1 4 9 16 25 36 y = 1 4 9 16 25 36 49 y = 1 4 9 16 25 36 49 64 y = 1 4 9 16 25 36 49 64 81 y = 1 4 9 16 25 36 49 64 81 100 y = 1 4 9 16 25 36 49 64 81 100 121 y = 1 4 9 16 25 36 49 64 81 100 121 144 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625

Assertion failed.

2   Fail
x = 100; y_correct = [1 4 9 16 25 36 49 64 81 100]; assert(isequal(prntseq(x),y_correct))

y = [] y = 1 y = 1 4 y = 1 4 9 y = 1 4 9 16 y = 1 4 9 16 25 y = 1 4 9 16 25 36 y = 1 4 9 16 25 36 49 y = 1 4 9 16 25 36 49 64 y = 1 4 9 16 25 36 49 64 81 y = 1 4 9 16 25 36 49 64 81 100 y = 1 4 9 16 25 36 49 64 81 100 121 y = 1 4 9 16 25 36 49 64 81 100 121 144 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 729 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 729 784 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 729 784 841 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 y = Columns 1 through 30 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 Column 31 961 y = Columns 1 through 15 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 Columns 16 through 30 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 Columns 31 through 32 961 1024 y = Columns 1 through 15 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 Columns 16 through 30 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 Columns 31 through 33 961 1024 1089 y = Columns 1 through 15 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 Columns 16 through 30 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 Columns 31 through 34 961 1024 1089 1156 y = Columns 1 through 15 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 Columns 16 through 30 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 Columns 31 through 35 961 1024 1089 1156 1225 y = Columns 1 through 15 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 Columns 16 through 30 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 Columns 31 through 36 961 1024 1089 1156 1225 1296 y = Columns 1 through 15 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 Columns 16 through 30 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 Columns 31 through 37 961 1024 1089 1156 1225 1296 1369 y = Columns 1 through 15 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 Columns 16 through 30 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 Columns 31 through 38 961 1024 1089 1156 1225 1296 1369 1444 y = Columns 1 through 15 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 Columns 16 through 30 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 Columns 31 through 39 961 1024 1089 1156 1225 1296 1369 1444 1521 y = Columns 1 through 15 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 Columns 16 through 30 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 Columns 31 through 40 961 1024 1089 1156 1225 1296 1369 1444 1521 1600 y = Columns 1 through 15 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 Columns 16 through 30 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 Columns 31 through 41 961 1024 1089 1156 1225 1296 1369 1444 1521 1600 1681 y = Columns 1 through 15 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 Columns 16 through 30 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 Columns 31 through 42 961 1024 1089 1156 1225 1296 1369 1444 1521 1600 1681 1764 y = Columns 1 through 15 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 Columns 16 through 30 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 Columns 31 through 43 961 1024 1089 1156 1225 1296 1369 1444 1521 1600 1681 1764 1849 y = Columns 1 through 15 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 Columns 16 through 30 256 289 324 361 ...

Assertion failed.

3   Fail
x = 9; y_correct = [1 4 9]; assert(isequal(prntseq(x),y_correct))

y = [] y = 1 y = 1 4 y = 1 4 9 y = 1 4 9 16 y = 1 4 9 16 25 y = 1 4 9 16 25 36 y = 1 4 9 16 25 36 49 y = 1 4 9 16 25 36 49 64 y = 1 4 9 16 25 36 49 64 81

Assertion failed.

4   Fail
x = 36; y_correct = [1 4 9 16 25 36]; assert(isequal(prntseq(x),y_correct))

y = [] y = 1 y = 1 4 y = 1 4 9 y = 1 4 9 16 y = 1 4 9 16 25 y = 1 4 9 16 25 36 y = 1 4 9 16 25 36 49 y = 1 4 9 16 25 36 49 64 y = 1 4 9 16 25 36 49 64 81 y = 1 4 9 16 25 36 49 64 81 100 y = 1 4 9 16 25 36 49 64 81 100 121 y = 1 4 9 16 25 36 49 64 81 100 121 144 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 729 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 729 784 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 729 784 841 y = 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 y = Columns 1 through 30 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 Column 31 961 y = Columns 1 through 15 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 Columns 16 through 30 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 Columns 31 through 32 961 1024 y = Columns 1 through 15 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 Columns 16 through 30 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 Columns 31 through 33 961 1024 1089 y = Columns 1 through 15 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 Columns 16 through 30 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 Columns 31 through 34 961 1024 1089 1156 y = Columns 1 through 15 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 Columns 16 through 30 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 Columns 31 through 35 961 1024 1089 1156 1225 y = Columns 1 through 15 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 Columns 16 through 30 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 Columns 31 through 36 961 1024 1089 1156 1225 1296

Assertion failed.