Cody

# Problem 28. Counting Money

Solution 1854816

Submitted on 21 Jun 2019 by Kodavati Mahendra
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 = {'\$12,001.87','\$0.04','\$103,887.55','\$0.32'}; b = 115889.78; assert(abs(moneySum(a)-b) < 1e-4)

a = 1×4 cell array {'12,001.87'} {'0.04'} {'103,887.55'} {'0.32'} a = 1×4 cell array {'12001.87'} {'0.04'} {'103887.55'} {'0.32'} ans = 1.1589e+05

2   Pass
a = {'\$0.02'}; b = 0.02; assert(abs(moneySum(a)-b) < 1e-4)

a = 1×1 cell array {'0.02'} a = 1×1 cell array {'0.02'} ans = 0.0200

3   Pass
a = {'\$81.47','\$12.69','\$91,337.60'}; b = 91431.76; assert(abs(moneySum(a)-b) < 1e-4)

a = 1×3 cell array {'81.47'} {'12.69'} {'91,337.60'} a = 1×3 cell array {'81.47'} {'12.69'} {'91337.60'} ans = 9.1432e+04
{"ft_lang_label":"__label__en","ft_lang_prob":0.5295874,"math_prob":0.978143,"size":821,"snap":"2019-51-2020-05","text_gpt3_token_len":353,"char_repetition_ratio":0.14687882,"word_repetition_ratio":0.12195122,"special_character_ratio":0.63824606,"punctuation_ratio":0.21929824,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9911673,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-26T10:57:46Z\",\"WARC-Record-ID\":\"<urn:uuid:3c1fc152-1356-49d1-b2c9-00d94b99d206>\",\"Content-Length\":\"73542\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:b0e37d4b-671d-41da-9879-ad624ef84341>\",\"WARC-Concurrent-To\":\"<urn:uuid:fa9f663c-aa01-423c-b3dc-260b8d5ff89c>\",\"WARC-IP-Address\":\"104.96.217.125\",\"WARC-Target-URI\":\"https://fr.mathworks.com/matlabcentral/cody/problems/28-counting-money/solutions/1854816\",\"WARC-Payload-Digest\":\"sha1:YXKWITSMWCDK35SBLIYP4HRTYO3XEDNW\",\"WARC-Block-Digest\":\"sha1:5ES6GY6STZXHQCZMGI2NSYDEKGBFO6YT\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579251688806.91_warc_CC-MAIN-20200126104828-20200126134828-00136.warc.gz\"}"}