Cody

Problem 42653. Generate the sum of Squares of the given number

Solution 1003604

Submitted on 9 Oct 2016 by Massimo Zanetti
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 = 1; assert(isequal(sumofsquares(x),y_correct))

sumValue = 1

2   Pass
x = 2; y_correct = 5; assert(isequal(sumofsquares(x),y_correct))

sumValue = 5

3   Pass
x = 3; y_correct = 14; assert(isequal(sumofsquares(x),y_correct))

sumValue = 14

4   Pass
x = 4; y_correct = 30; assert(isequal(sumofsquares(x),y_correct))

sumValue = 30
{"ft_lang_label":"__label__en","ft_lang_prob":0.51356506,"math_prob":0.99986625,"size":707,"snap":"2019-43-2019-47","text_gpt3_token_len":216,"char_repetition_ratio":0.14793742,"word_repetition_ratio":0.0,"special_character_ratio":0.31541726,"punctuation_ratio":0.11627907,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99960905,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-10-22T04:51:40Z\",\"WARC-Record-ID\":\"<urn:uuid:3ae49c3a-91ec-419b-928d-888d1c22bb3a>\",\"Content-Length\":\"71330\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:93ee643e-a94e-435e-a2df-c775c2f728a4>\",\"WARC-Concurrent-To\":\"<urn:uuid:ef535a49-3522-48a6-95ba-2059d9c81a0a>\",\"WARC-IP-Address\":\"104.110.193.39\",\"WARC-Target-URI\":\"https://au.mathworks.com/matlabcentral/cody/problems/42653-generate-the-sum-of-squares-of-the-given-number/solutions/1003604\",\"WARC-Payload-Digest\":\"sha1:GP43WYUSS7WBOWGWQGCICYZM5Z6OTIW6\",\"WARC-Block-Digest\":\"sha1:YUHOL7ATF7LDUAZZQW5JBYVDSLR7VPK7\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-43/CC-MAIN-2019-43_segments_1570987798619.84_warc_CC-MAIN-20191022030805-20191022054305-00545.warc.gz\"}"}