Cody

Solution 1984908

Submitted on 21 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   Pass
x = 1; y_correct = 0; assert(isequal(VanEcksSequence(x),y_correct))

y = 0

2   Pass
x = 2; y_correct = 0; assert(isequal(VanEcksSequence(x),y_correct))

y = 0 0

3   Pass
x = 4; y_correct = 0; assert(isequal(VanEcksSequence(x),y_correct))

y = 0 0 1 0

4   Pass
x = 6; y_correct = 0; assert(isequal(VanEcksSequence(x),y_correct))

y = 0 0 1 0 3 0

5   Fail
x = 11; y_correct = 0; assert(isequal(VanEcksSequence(x),y_correct))

y = 0 0 1 0 3 0 5 0 7 0 9

Assertion failed.

6   Fail
x = 50; y_correct = 3; assert(isequal(VanEcksSequence(x),y_correct))

y = Columns 1 through 30 0 0 1 0 3 0 5 0 7 0 9 0 11 0 13 0 15 0 17 0 19 0 21 0 23 0 25 0 27 0 Columns 31 through 50 29 0 31 0 33 0 35 0 37 0 39 0 41 0 43 0 45 0 47 0

Assertion failed.

7   Fail
x = 500; y_correct = 4; assert(isequal(VanEcksSequence(x),y_correct))

y = Columns 1 through 30 0 0 1 0 3 0 5 0 7 0 9 0 11 0 13 0 15 0 17 0 19 0 21 0 23 0 25 0 27 0 Columns 31 through 60 29 0 31 0 33 0 35 0 37 0 39 0 41 0 43 0 45 0 47 0 49 0 51 0 53 0 55 0 57 0 Columns 61 through 90 59 0 61 0 63 0 65 0 67 0 69 0 71 0 73 0 75 0 77 0 79 0 81 0 83 0 85 0 87 0 Columns 91 through 120 89 0 91 0 93 0 95 0 97 0 99 0 101 0 103 0 105 0 107 0 109 0 111 0 113 0 115 0 117 0 Columns 121 through 150 119 0 121 0 123 0 125 0 127 0 129 0 131 0 133 0 135 0 137 0 139 0 141 0 143 0 145 0 147 0 Columns 151 through 180 149 0 151 0 153 0 155 0 157 0 159 0 161 0 163 0 165 0 167 0 169 0 171 0 173 0 175 0 177 0 Columns 181 through 210 179 0 181 0 183 0 185 0 187 0 189 0 191 0 193 0 195 0 197 0 199 0 201 0 203 0 205 0 207 0 Columns 211 through 240 209 0 211 0 213 0 215 0 217 0 219 0 221 0 223 0 225 0 227 0 229 0 231 0 233 0 235 0 237 0 Columns 241 through 270 239 0 241 0 243 0 245 0 247 0 249 0 251 0 253 0 255 0 257 0 259 0 261 0 263 0 265 0 267 0 Columns 271 through 300 269 0 271 0 273 0 275 0 277 0 279 0 281 0 283 0 285 0 287 0 289 0 291 0 293 0 295 0 297 0 Columns 301 through 330 299 0 301 0 303 0 305 0 307 0 309 0 311 0 313 0 315 0 317 0 319 0 321 0 323 0 325 0 327 0 Columns 331 through 360 329 0 331 0 333 0 335 0 337 0 339 0 341 0 343 0 345 0 347 0 349 0 351 0 353 0 355 0 357 0 Columns 361 through 390 359 0 361 0 363 0 365 0 367 0 369 0 371 0 373 0 375 0 377 0 379 0 381 0 383 0 385 0 387 0 Columns 391 through 420 389 0 391 0 393 0 395 0 397 0 399 0 401 0 403 0 405 0 407 0 409 0 411 0 413 0 415 0 417 0 Columns 421 through 450 419 0 421 0 423 0 425 0 427 0 429 0 431 0 433 0 435 0 437 0 439 0 441 0 443 0 445 0 447 0 Columns 451 through 480 449 0 451 0 453 0 455 0 457 0 459 0 461 0 463 0 465 0 467 0 469 0 471 0 473 0 475 0 477 0 Columns 481 through 500 479 0 481 0 483 0 485 0 487 0 489 0 491 0 493 0 495 0 497 0

Assertion failed.

8   Fail
x = 5000; y_correct = 402; assert(isequal(VanEcksSequence(x),y_correct))

y = Columns 1 through 15 0 0 1 0 3 0 5 0 7 0 9 0 11 0 13 Columns 16 through 30 0 15 0 17 0 19 0 21 0 23 0 25 0 27 0 Columns 31 through 45 29 0 31 0 33 0 35 0 37 0 39 0 41 0 43 Columns 46 through 60 0 45 0 47 0 49 0 51 0 53 0 55 0 57 0 Columns 61 through 75 59 0 61 0 63 0 65 0 67 0 69 0 71 0 73 Columns 76 through 90 0 75 0 77 0 79 0 81 0 83 0 85 0 87 0 Columns 91 through 105 89 0 91 0 93 0 95 0 97 0 99 0 101 0 103 Columns 106 through 120 0 105 0 107 0 109 0 111 0 113 0 115 0 117 0 Columns 121 through 135 119 0 121 0 123 0 125 0 127 0 129 0 131 0 133 Columns 136 through 150 0 135 0 137 0 139 0 141 0 143 0 145 0 147 0 Columns 151 through 165 149 0 151 0 153 0 155 0 157 0 159 0 161 0 163 Columns 166 through 180 0 165 0 167 0 169 0 171 0 173 0 175 0 177 0 Columns 181 through 195 179 0 181 0 183 0 185 0 187 0 189 0 191 0 193 Columns 196 through 210 0 195 0 197 0 199 0 201 0 203 0 205 0 207 0 Columns 211 through 225 209 0 211 0 213 0 215 0 217 0 219 0 221 0 223 Columns 226 through 240 0 225 0 227 0 229 0 231 0 233 0 235 0 237 0 Columns 241 through 255 239 0 241 0 243 0 245 0 247 0 249 0 251 0 253 Columns 256 through 270 0 255 0 257 0 259 0 261 0 263 0 265 0 267 0 Columns 271 through 285 269 0 271 0 273 0 275 0 277 0 279 0 281 0 283 Columns 286 through 300 0 285 0 287 0 289 0 291 0 293 0 295 0 297 0 Columns 301 through 315 299 0 301 0 303 0 305 0 307 0 309 0 311 0 313 Columns 316 through 330 0 315 0 317 0 319 0 321 0 323 0 325 0 327 0 Columns 331 through 345 329 0 331 0 333 0 335 0 337 0 339 0 341 0 343 Columns 346 through 360 0 345 0 347 0 349 0 351 0 353 0 355 0 357 0 Columns 361 through 375 359 0 361 0 363 0 365 0 367 0 369 0 371 0 373 Columns 376 through 390 0 375 0 377 0 379 0 381 0 383 0 385 0 387 0 Columns 391 through 405 389 0 391 0 393 0 395 0 397 0 399 0 401 0 403 Columns 406 through 420 0 405 0 407 0 409 0 411 0 413 0 415 0 417 0 Columns 421 through 435 419 0 421 0 423 0 425 0 427 0 429 0 431 0 433 Columns 436 through 450 0 435 0 437 0 439 0 441 0 443 0 445 0 447 0 Columns 451 through 465 449 0 451 0 453 0 455 0 457 0 459 0 461 0 463 Columns 466 through 480 0 465 0 467 0 469 0 471 0 473 0 475 0 477 0 Columns 481 through 495 479 0 481 0 483 0 485 0 487 0 489 0 491 0 493 Columns 496 through 510 0 495 0 497 0 499 0 501 0 503 0 505 0 507 0 Columns 511 through 525 509 0 511 0 513 0 515 0 517 0 519 0 521 0 523 Columns 526 through 540 0 525 0 527 0 529 0 531 0 533 0 535 0 537 0 Columns 541 through 555 539 0 541 0 543 0 545 0 547 0 549 0 551 0 553 Columns 556 through 570 0 555 0 557 0 559 0 561 0 563 0 565 0 567 0 Columns 571 through 585 569 0 571 0 573 0 575 0 577 0 579 0 581 0 583 Columns 586 through 600 0 585 0 587 0 589 0 591 0 593 0 595 0 597 0 Columns 601 through 615 599 0 601 0 603 0 605 0 607 0 609 0 611 0 613 Columns 616 through 630 0 615 0 617 0 619 0 621 0 623 0 625 0 627 0 Columns 631 through 645 629 0 631 0 633 0 635 0 637 0 639 0 641 0 643 Columns 646 through 660 0 645 0 647 0 649 0 651 0 653 0 655 0 657 0 Columns 661 through 675 659 0 661 0 663 0 665 0 667 0 669 0 671 0 673 Columns 676 through 690 0 675 0 677 0 679 0 681 0 683 0 685 0 687 0 Columns 691 through 705 689 0 691 0 693 0 695 0 697 0 699 0 701 0 703 Columns 706 through 720 0 705 0 707 0 709 0 711 0 713 0 715 0 ...

Assertion failed.

9   Fail
x = 50000; y_correct = 114; assert(isequal(VanEcksSequence(x),y_correct))

y = Columns 1 through 15 0 0 1 0 3 0 5 0 7 0 9 0 11 0 13 Columns 16 through 30 0 15 0 17 0 19 0 21 0 23 0 25 0 27 0 Columns 31 through 45 29 0 31 0 33 0 35 0 37 0 39 0 41 0 43 Columns 46 through 60 0 45 0 47 0 49 0 51 0 53 0 55 0 57 0 Columns 61 through 75 59 0 61 0 63 0 65 0 67 0 69 0 71 0 73 Columns 76 through 90 0 75 0 77 0 79 0 81 0 83 0 85 0 87 0 Columns 91 through 105 89 0 91 0 93 0 95 0 97 0 99 0 101 0 103 Columns 106 through 120 0 105 0 107 0 109 0 111 0 113 0 115 0 117 0 Columns 121 through 135 119 0 121 0 123 0 125 0 127 0 129 0 131 0 133 Columns 136 through 150 0 135 0 137 0 139 0 141 0 143 0 145 0 147 0 Columns 151 through 165 149 0 151 0 153 0 155 0 157 0 159 0 161 0 163 Columns 166 through 180 0 165 0 167 0 169 0 171 0 173 0 175 0 177 0 Columns 181 through 195 179 0 181 0 183 0 185 0 187 0 189 0 191 0 193 Columns 196 through 210 0 195 0 197 0 199 0 201 0 203 0 205 0 207 0 Columns 211 through 225 209 0 211 0 213 0 215 0 217 0 219 0 221 0 223 Columns 226 through 240 0 225 0 227 0 229 0 231 0 233 0 235 0 237 0 Columns 241 through 255 239 0 241 0 243 0 245 0 247 0 249 0 251 0 253 Columns 256 through 270 0 255 0 257 0 259 0 261 0 263 0 265 0 267 0 Columns 271 through 285 269 0 271 0 273 0 275 0 277 0 279 0 281 0 283 Columns 286 through 300 0 285 0 287 0 289 0 291 0 293 0 295 0 297 0 Columns 301 through 315 299 0 301 0 303 0 305 0 307 0 309 0 311 0 313 Columns 316 through 330 0 315 0 317 0 319 0 321 0 323 0 325 0 327 0 Columns 331 through 345 329 0 331 0 333 0 335 0 337 0 339 0 341 0 343 Columns 346 through 360 0 345 0 347 0 349 0 351 0 353 0 355 0 357 0 Columns 361 through 375 359 0 361 0 363 0 365 0 367 0 369 0 371 0 373 Columns 376 through 390 0 375 0 377 0 379 0 381 0 383 0 385 0 387 0 Columns 391 through 405 389 0 391 0 393 0 395 0 397 0 399 0 401 0 403 Columns 406 through 420 0 405 0 407 0 409 0 411 0 413 0 415 0 417 0 Columns 421 through 435 419 0 421 0 423 0 425 0 427 0 429 0 431 0 433 Columns 436 through 450 0 435 0 437 0 439 0 441 0 443 0 445 0 447 0 Columns 451 through 465 449 0 451 0 453 0 455 0 457 0 459 0 461 0 463 Columns 466 through 480 0 465 0 467 0 469 0 471 0 473 0 475 0 477 0 Columns 481 through 495 479 0 481 0 483 0 485 0 487 0 489 0 491 0 493 Columns 496 through 510 0 495 0 497 0 499 0 501 0 503 0 505 0 507 0 Columns 511 through 525 509 0 511 0 513 0 515 0 517 0 519 0 521 0 523 Columns 526 through 540 0 525 0 527 0 529 0 531 0 533 0 535 0 537 0 Columns 541 through 555 539 0 541 0 543 0 545 0 547 0 549 0 551 0 553 Columns 556 through 570 0 555 0 557 0 559 0 561 0 563 0 565 0 567 0 Columns 571 through 585 569 0 571 0 573 0 575 0 577 0 579 0 581 0 583 Columns 586 through 600 0 585 0 587 0 589 0 591 0 593 0 595 0 597 0 Columns 601 through 615 599 0 601 0 603 0 605 0 607 0 609 0 611 0 613 Columns 616 through 630 0 615 0 617 0 619 0 621 0 623 0 625 0 627 0 Columns 631 through 645 629 0 631 0 633 0 635 0 637 0 639 0 641 0 643 Columns 646 through 660 0 645 0 647 0 649 0 651 0 653 0 655 0 657 0 Columns 661 through 675 659 0 661 0 663 0 665 0 667 0 669 0 671 0 673 Columns 676 through 690 0 675 0 677 0 679 0 681 0 683 0 685 0 687 0 Columns 691 through 705 689 0 691 0 693 0 695 0 697 0 699 0 701 0 703 Columns 706 through 720 0 705 0 707 0 709 0 711 0 713 0 715 0 ...

Assertion failed.