Cody

# Problem 896. Sophie Germain prime

Solution 1934222

Submitted on 13 Sep 2019 by nachi
• Size: 7
• 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
p = 233; y_correct = true; assert(isequal(your_fcn_name(p),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In your_fcn_name (line 2) In ScoringEngineTestPoint1 (line 3) In solutionTest (line 3)]

2   Pass
p = 23; y_correct14 = true; assert(isequal(your_fcn_name(p),y_correct14))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In your_fcn_name (line 2) In ScoringEngineTestPoint2 (line 3) In solutionTest (line 5)]

3   Pass
p = 22; y_correct14 = false; assert(isequal(your_fcn_name(p),y_correct14))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In your_fcn_name (line 2) In ScoringEngineTestPoint3 (line 3) In solutionTest (line 7)]

4   Pass
p = 1 % p must also be a prime number !! y_correct1t = false; assert(isequal(your_fcn_name(p),y_correct1t))

p = 1 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In your_fcn_name (line 2) In ScoringEngineTestPoint4 (line 3) In solutionTest (line 9)]

5   Pass
p = 14 % p must also be a prime number !! correct1t = false; assert(isequal(your_fcn_name(p),correct1t))

p = 14 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In your_fcn_name (line 2) In ScoringEngineTestPoint5 (line 3) In solutionTest (line 11)]

6   Pass
p = 29 correct1tp = true; assert(isequal(your_fcn_name(p),correct1tp))

p = 29 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In your_fcn_name (line 2) In ScoringEngineTestPoint6 (line 3) In solutionTest (line 13)]

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
{"ft_lang_label":"__label__en","ft_lang_prob":0.7024242,"math_prob":0.9081148,"size":2261,"snap":"2020-45-2020-50","text_gpt3_token_len":665,"char_repetition_ratio":0.15817457,"word_repetition_ratio":0.5408451,"special_character_ratio":0.29677135,"punctuation_ratio":0.099744245,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95308495,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-12-02T04:07:43Z\",\"WARC-Record-ID\":\"<urn:uuid:d5e5c45d-05c4-405f-847d-f495df61074d>\",\"Content-Length\":\"83275\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:4e027f09-9bf7-4879-8748-d87ecada6e19>\",\"WARC-Concurrent-To\":\"<urn:uuid:f12895a4-f282-4e4b-b5e6-c9d3c5496997>\",\"WARC-IP-Address\":\"23.62.16.154\",\"WARC-Target-URI\":\"https://jp.mathworks.com/matlabcentral/cody/problems/896-sophie-germain-prime/solutions/1934222\",\"WARC-Payload-Digest\":\"sha1:SIJJ36OUKC375VNAMFBUCV3ZMK6CPMKB\",\"WARC-Block-Digest\":\"sha1:BIMWMTCW5ZOL43RO2Z7DUFSYOYP33DUT\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-50/CC-MAIN-2020-50_segments_1606141686635.62_warc_CC-MAIN-20201202021743-20201202051743-00445.warc.gz\"}"}