Cody

# Problem 20. Summing digits

Solution 1342

Submitted on 26 Jan 2012
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
%% a = 1; b = 2; out = sumDigits(a); assert(isequal(out, b))

b = 2

2   Fail
%% a = 10; b = 7; out = sumDigits(a); assert(isequal(out, b))

Error: Assertion failed.

3   Fail
%% a = 16; b = 25; out = sumDigits(a); assert(isequal(out, b))

Error: Assertion failed.
{"ft_lang_label":"__label__en","ft_lang_prob":0.61537445,"math_prob":0.99069554,"size":419,"snap":"2020-10-2020-16","text_gpt3_token_len":136,"char_repetition_ratio":0.12289157,"word_repetition_ratio":0.14473684,"special_character_ratio":0.37470168,"punctuation_ratio":0.20652173,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.96492875,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-03-29T02:21:09Z\",\"WARC-Record-ID\":\"<urn:uuid:754d326f-1363-4239-ae1e-6228962842a3>\",\"Content-Length\":\"72923\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:e0ba01f3-bcd9-483a-a86d-2280b349e33e>\",\"WARC-Concurrent-To\":\"<urn:uuid:7e626e14-5a3b-4fe0-9134-4d1db606fccd>\",\"WARC-IP-Address\":\"104.117.0.182\",\"WARC-Target-URI\":\"https://fr.mathworks.com/matlabcentral/cody/groups/2/problems/20-summing-digits/solutions/1342\",\"WARC-Payload-Digest\":\"sha1:2JBCTQWRV2R2DO2FWKEV7BMOGLDMVO6F\",\"WARC-Block-Digest\":\"sha1:W3JIYIZKRNNCK35ERVKS5J6TU5OEKQ7B\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-16/CC-MAIN-2020-16_segments_1585370493684.2_warc_CC-MAIN-20200329015008-20200329045008-00472.warc.gz\"}"}