Cody

# Problem 42977. Prime number removal

Solution 1104377

Submitted on 15 Jan 2017 by Ed Rasmussen
• Size: 11
• This is the leading solution.
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 = [277 680 656 163 119 499 960 341 586 224 752 256 506 700]; y_correct = [ 680 656 119 960 341 586 224 752 256 506 700] ; assert(isequal(prime_remove(x),y_correct))

y_correct = 680 656 119 960 341 586 224 752 256 506 700 y = 680 656 119 960 341 586 224 752 256 506 700 ans = []

2   Pass
x = [ 891 960 548 139 150 258 841 255 815 244 930 350 197 252] ; y_correct = [891 960 548 150 258 841 255 815 244 930 350 252] ; assert(isequal(prime_remove(x),y_correct))

x = 891 960 548 139 150 258 841 255 815 244 930 350 197 252 y_correct = 891 960 548 150 258 841 255 815 244 930 350 252 y = 891 960 548 150 258 841 255 815 244 930 350 252 ans = []

3   Pass
x = [617 474 352 831 586 550 918 286 758 754 381 568 76 54] ; y_correct = [474 352 831 586 550 918 286 758 754 381 568 76 54] ; assert(isequal(prime_remove(x),y_correct))

x = 617 474 352 831 586 550 918 286 758 754 381 568 76 54 y_correct = 474 352 831 586 550 918 286 758 754 381 568 76 54 y = 474 352 831 586 550 918 286 758 754 381 568 76 54 ans = []

4   Pass
x = [ 531 780 935 130 569 470 12 338 163 795 312 529 166 602] ; y_correct = [ 531 780 935 130 470 12 338 795 312 529 166 602] ; assert(isequal(prime_remove(x),y_correct))

x = 531 780 935 130 569 470 12 338 163 795 312 529 166 602 y_correct = 531 780 935 130 470 12 338 795 312 529 166 602 y = 531 780 935 130 470 12 338 795 312 529 166 602 ans = []

5   Pass
x = [107 962 5 775 818 869 85 400 260 801 432 911 182 264] ; y_correct = [ 962 775 818 869 85 400 260 801 432 182 264] ; assert(isequal(prime_remove(x),y_correct)) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

x = 107 962 5 775 818 869 85 400 260 801 432 911 182 264 y_correct = 962 775 818 869 85 400 260 801 432 182 264 y = 962 775 818 869 85 400 260 801 432 182 264 ans = []