Cody

# Problem 568. Number of 1s in a binary string

Solution 1904336

Submitted on 19 Aug 2019 by Mikko Garcia
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 = '0000'; y_correct = 0; assert(isequal(one(x),y_correct));

2   Pass
x = '111'; y_correct = 3; assert(isequal(one(x),y_correct));

3   Pass
x = '1100101'; y_correct = 4; assert(isequal(one(x),y_correct));
{"ft_lang_label":"__label__en","ft_lang_prob":0.6506023,"math_prob":0.9846056,"size":518,"snap":"2020-34-2020-40","text_gpt3_token_len":151,"char_repetition_ratio":0.15175097,"word_repetition_ratio":0.0,"special_character_ratio":0.34749034,"punctuation_ratio":0.15151516,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.989111,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-08-04T11:34:28Z\",\"WARC-Record-ID\":\"<urn:uuid:f11d96d1-5f29-43b2-ab9d-d0ebed932e58>\",\"Content-Length\":\"72341\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:f1c638e0-8470-4c43-9c01-db250df66a26>\",\"WARC-Concurrent-To\":\"<urn:uuid:e6acebb3-4db6-45c2-9475-bca325b1233e>\",\"WARC-IP-Address\":\"23.66.56.59\",\"WARC-Target-URI\":\"https://kr.mathworks.com/matlabcentral/cody/problems/568-number-of-1s-in-a-binary-string/solutions/1904336\",\"WARC-Payload-Digest\":\"sha1:U3EDYM3KN6BRXUQLKHFO4BTH6HAGZGAF\",\"WARC-Block-Digest\":\"sha1:S3YNAGHRCNEEBER5YGQQ35QHFOLQABM4\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-34/CC-MAIN-2020-34_segments_1596439735867.93_warc_CC-MAIN-20200804102630-20200804132630-00429.warc.gz\"}"}