### Problem Statement

You have some digits, and you want to use one or more of them to create the largest possible number. The number must have no extra leading zeroes, and no two adjacent digits can be the same. For example, "0121" and "2110" are not valid numbers.

You are given a int[] digits containing exactly 10 elements. The i-th element (0-based) is the number of digit i that you have. Return a String denoting the maximum valid number you can create.

### Definition

 Class: RepresentNumber Method: maximumNumber Parameters: int[] Returns: String Method signature: String maximumNumber(int[] digits) (be sure your method is public)

### Constraints

-digits will contain exactly 10 elements.
-Each element of digits will be between 0 and 50, inclusive.
-The sum of the elements of digits will be between 1 and 50, inclusive.

### Examples

0)

 `{3,0,0,0,0,0,0,0,0,0}`
`Returns: "0"`
1)

 `{4,1,2,0,0,0,0,0,0,0}`
`Returns: "202010"`
2)

 `{4,1,8,0,0,0,0,0,0,0}`
`Returns: "21202020202"`
 You can't use all the '2' digits.
3)

 `{0,1,4,4,1,4,0,2,2,0}`
`Returns: "878754535352323212"`
4)

 `{0,3,3,2,4,4,3,4,1,4}`
`Returns: "9897979767656545454343212121"`

#### Problem url:

http://www.topcoder.com/stat?c=problem_statement&pm=8770

#### Problem stats url:

http://www.topcoder.com/tc?module=ProblemDetail&rd=12212&pm=8770

stone

#### Testers:

PabloGilberto , Olexiy , ivan_metelsky

Greedy
{"ft_lang_label":"__label__en","ft_lang_prob":0.6763772,"math_prob":0.9558374,"size":1019,"snap":"2019-51-2020-05","text_gpt3_token_len":275,"char_repetition_ratio":0.13103448,"word_repetition_ratio":0.0121951215,"special_character_ratio":0.33562315,"punctuation_ratio":0.12849163,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9645269,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-22T05:16:45Z\",\"WARC-Record-ID\":\"<urn:uuid:1acb1c4f-d67e-48b0-9f53-fe7f77d006e0>\",\"Content-Length\":\"6219\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3648ca17-d217-49a7-a6b2-00b62e95e09d>\",\"WARC-Concurrent-To\":\"<urn:uuid:18dafb57-7f0f-4f34-9578-1ddb59c711e6>\",\"WARC-IP-Address\":\"78.128.6.10\",\"WARC-Target-URI\":\"http://topcoder.bgcoder.com/print.php?id=2151\",\"WARC-Payload-Digest\":\"sha1:X22DYGJUXJ7362NGCNH3KFXI2QTRMX5X\",\"WARC-Block-Digest\":\"sha1:CNXFP4NEPZJ24R3H2MMCHLPVYBA7BE32\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579250606696.26_warc_CC-MAIN-20200122042145-20200122071145-00492.warc.gz\"}"}