[Question]
  [
## Premise:
Your reputation is in Stack-Exchange Form if it can be represented by decomposing your medal counts (gold, silver, and bronze counted separately) into their base-10 digits and joining them in any given order, with a few caveats. 
While decomposing, each 
* Gold medal digit is worth three digits.
* Silver is worth two digits.
* Bronze is one digit.
* Additionally, since SE does not display a medal type if you do not have any, a count of 0 medals for a type will **not** yield a `[0]`.
**Example:**
* `[1 Gold, 2 Silvers, 3 Bronzes]` will decompose into `[1,1,1,2,2,3]`. 321112 and 213121 are two examples of an SE-form number for these medals.
* `[20 Golds, 0 Silvers, 20 Bronzes]` will decompose into `[2,2,2,0,0,0,2,0]`. 20002022 is an SE-form number.
* `[11 Golds, 0 Silvers, 0 Bronzes]` will decompose into `[1,1,1,1,1,1]`. 111111 is the only SE-form number for this.
There will be no leading 0's when considering a SE number. E.g., in the 2nd example above, `00002222 -> 2222` would not be considered a SE-form number for `[20,0,20]`.
## Input/Output:
Input is a list/tuple/array/whatever of `[reputation, gold_medals, silver_medals, bronze_medals]` which are all non-negative integers. This is the assumed order but can be changed. Just make a note in your answer if you do.
Output is any two consistent values for true and false.
## Rules:
* Input will always be valid
* You will always have at least 1 Rep
* You can have no medals at all, which should always return false then.
* The medal counts have no bearing on reality. Having several hundred golds and no bronzes is fine.
* This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") so shortest answer in bytes wins.
## Test Cases:
```
#[Rep, Gold, Silver, Bronze] -> Output
[4, 0, 0, 4]       -> True
[1447, 0, 4, 17]   -> True
[74414, 4, 0, 17]  -> True
[4444, 4, 0, 4]    -> True
[4455, 0, 54, 0]   -> True
[5355, 5, 0, 3]    -> True
[53535, 5, 3, 0]   -> True
[4444, 0, 0, 4444] -> True
[444, 4, 0, 0]     -> True
[1234, 0, 0, 1234] -> True
[1234, 0, 0, 4321] -> True
[4444, 1, 0, 1]      -> False
[5555, 5, 0, 55]     -> False
[1234, 1, 23, 4]     -> False
[1, 0, 0, 0]         -> False
[1001001, 0, 10, 10] -> False
```
  
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), ~~16~~ ~~14~~ ~~13~~ ~~11~~ 10 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
∞×0KJ‚€{íË
```
Takes the medals input in the order `[bronze, silver, gold]` as first input, and `reputation` as second input.
-1 byte thanks to *@Grimy*.
[Try it online](https://tio.run/##yy9OTMpM/f//Uce8w9MNvL0eNcx61LSm@vDaw93//0cbGugAkUEsl6GBAQgBAA) or [verify all test cases](https://tio.run/##RY0xCsJQDIavIp0z5DV5dOzipEcoHSo6uOhQEMRFHFRwcxEc3AW9hPUk7yLP5KVqCOH/yJ8/y7aZzGdxtX4fXvdhmQ2axXSQla3KsD@LjOF46y44HoXtNewem@7ZnSLEqmJgQMAaKsdcgCuUhfiLCKwolZwG3ov05vQkRMoGpDtKZFc67EWvUojLiSGN/r1Kptz9vbIXcBorBfb0Z4Wc0i4dWASiNjjUxrr@AA).
**Explanation:**
```
∞           # Push an infinite positive list: [1,2,3,...]
 ×          # Repeat the values in the (implicit) input-list that many times as string
            # (since the input-list contains just 3 values, the rest of the infinite
            #  list is ignored)
  0K        # Remove all 0s (so all "0", "00" and "000")
    J       # Join the strings in the list together
     ‚      # Pair this string with the (implicit) second input
      €{í   # Sort the digits in both strings in descending order
         Ë  # And check if both are now equal
            # (after which the result is output implicitly as result)
```
[Answer]
# JavaScript (ES6), ~~92~~ 74 bytes
Takes input as `(['gold','silver','bronze'])('rep')`. Returns a Boolean value.
```
b=>r=>[...b.map((n,i)=>n.repeat(+n&&3-i)).join``].sort()+''==[...r].sort()
```
[Try it online!](https://tio.run/##hZHBjsIgGITv@xR7EoiVlALxRI8@gTfXRHSr1lRoaN1kn75LoZU1abEhfwj5OjMMN/kjm5Mp63al9HfRnUV3FLkR@Q5jfMR3WUOokhKJXGFT1IVs4VItFnRVIoRvulSHwx432rQQLQEQov/NjCfdSatGVwWu9AWCrXm011@APv6fnuEOpCD59IOBPYJ2ohmI9YOsHUUYW0@B7Kk2gOw9Ofjab9aaD7QHOZ8C@VOQOo7TCEeDnuUon3X2CftssZDhMmNGFlckGfWKbhM3pxl5QV9Y8KU2smqmXpYEt2j4UJwtzDXCp5tzghkNb/Y@vK@DzEJknA5L035ZuPsD "JavaScript (Node.js) – Try It Online")
---
# JavaScript (ES6), 74 bytes
Takes input as `(gold, silver, bronze, 'rep')`. Returns a Boolean value.
```
(g,s,b,r)=>(F=s=>[...s].sort()+0)(r)==F([g,g,g,s,s,b].filter(x=>x).join``)
```
[Try it online!](https://tio.run/##fZFNbsMgEIX3PUV2gEqRMYyywkufoLs0UtzUdhxZpgK3Sk/vDqaLVIbwIyTeNzOP4dp8N/7shs/5ZbIf7dKZhfbc83fumKlobbypDkIIfxTeupmy54JRlExNDz0P0wf6KLphnFtHb6a6MXG1w3Q6seVsJ2/HVoy2p@TVfc2XH8Ke7m87WvAdLs13RBOWEFGRe1Sl1vstoNfoFdCPiDU/jmQJiAwCAFsAVlGhDiqjqxiPuoJkheAAR9ZENBA96FwGWaqQIRzZIqqUd8g/hrxNdTP67Q/ImD1rLjYAILwQUh3A0FLFHj8yF54nk6L820QWRVgILb8 "JavaScript (Node.js) – Try It Online")
[Answer]
# [MATL](https://github.com/lmendo/MATL), ~~28 bytes~~ ~~20 bytes~~ ~~16 bytes~~ 13 bytes
Returns 0 for false and 1 for true. This can definitely be golfed down. 
```
[1,3,2,1]Y"t2:7)XzVXzY@Ums0>
```
Down to 16 bytes if the reputation score can be taken in separately, and the order is [bronze, silver, gold], reputation  
Down to 13 bytes thanks to Luis Mendo
```
3:Y"XzVXzY@Um
```
[Try it online!](https://tio.run/##y00syfmf8N/YKlIpoiosoirSITT3v0vI/2hDcx0THYNYLkMTE3OuaEMdAx3DWC4TIAAA "MATL – Try It Online")
[Answer]
# [J](http://jsoftware.com/), ~~38~~ ~~34~~ ~~31~~ 20 bytes
```
-:&(\:~&.":)]#~#\.**
```
[Try it online!](https://tio.run/##ZZHBqgIxDEX3fsVFQd@IDs00YaDgSnDlyrVv9VDEjX/gr49JJx2rL3QgnHu5TTP3Yd6urtglrLBBQNJv22J/Oh6GbVr@nNNz2c5T87t4Ls7tej00s8vf7QEiEbLCVXsIaOSxU9YZRIfo3qDl1qD5FErGO0D5bKSswFyMsdzL3GeBQf1Ee2YyP1tqXyhrOeR3ArNIThATCpWYqSiKqGkccay8npuHs3aiflmo5@1i8eb2H2XdFPzJAbsSbpug@uGmiUxDavOpeaSuO/rKKs3vCgC@M/Wn2MkOymd4AQ "J – Try It Online")
*-11 bytes thanks to FrownyFrog!*
[Answer]
# [Ruby](https://www.ruby-lang.org/), 69 bytes
```
->r,g,s,b{([g,g,g,s,s,b]-[0]).flat_map(&:digits).sort==r.digits.sort}
```
[Try it online!](https://tio.run/##XY/daoQwEIXvfYpcSNGSTRMzQSjYFwlB3K5mXdxdSbItpfTZbX7UQocJzPk4c4aYx/FrGZrl8GawxhYfvwupsY6zV@ogqSrJMHWuvXZz8fR6GvXobEns3bimMSTpKH@Wz/M49Uj3zmZoNuPNobwl7@f7dSbT5WFdUbESo0E@9x/dVORtqTDKX7L@dlokYERjg8okA6iTwIjVHtQADKKkKwFfG4CohYhCBOaB4AEkxpPmCfBkSAnrUV8JbZnBwSq@O8L8DwGv2J7DkiscEn@Hhdh3vKHi6/e2hHiE0tBpPT71Cw "Ruby – Try It Online")
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 45 bytes
```
,0
,
,(\d*),(\d*),
¶$1$1$1$2$2
%O`.
^(.+)¶\1$
```
[Try it online!](https://tio.run/##RY5BDsJACEX3nGOatEqaYYD0CC69QGNqogs3Loxn6wF6sSkwNQKZvA8fMp/n9/W@166/LBUzIGA/P07D8cK2JoosqUB3XUa49eN52NaZUq2C2VKARCYHpAkkhE9cWASLoaqBmgJlY1fsyM5s7XDHRQv4rWagwq3v8FfChdoO@QxUj6uqzURY2H8XbjuTs5d7vXY "Retina 0.8.2 – Try It Online") Link includes test suite. Explanation:
```
,0
,
```
Delete zero scores.
```
,(\d*),(\d*),
¶$1$1$1$2$2
```
Expand the gold and silver scores, and convert the separator to a newline.
```
%O`.
```
Sort the reputation and the expanded scores separately.
```
^(.+)¶\1$
```
Compare the sorted digits.
[Answer]
# [Japt](https://github.com/ETHproductions/japt), ~~14~~ ~~13~~ 12 bytes
```
íp fn ¬á øUg
```
Takes input as `[rep, bronze, silver, gold]`
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=7XAgZm4grOEg%2bFVn&input=WyI0IiwiNCIsIjAiLCIwIl0) or [Verify all test cases](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LW1S&code=VD1VzlXF1HVUIO1wIGZuIKzhIPhVZw&input=WwpbIjQiLCAiMCIsICIwIiwgIjQiXSwKWyIxNDQ3IiwgIjAiLCAiNCIsICIxNyJdLApbIjQxNDQ3IiwgIjQiLCAiMCIsICIxNyJdLApbIjQ0NDQiLCAiNCIsICIwIiwgIjQiXSwKWyI0NDU1IiwgIjAiLCAiNTQiLCAiMCJdLApbIjUzNTUiLCAiNSIsICIwIiwgIjMiXSwKWyI1MzUzNSIsICI1IiwgIjMiLCAiMCJdLApbIjQ0NDQiLCAiMCIsICIwIiwgIjQ0NDQiXSwKWyI0NDQiLCAiNCIsICIwIiwgIjAiXSwKWyIxMjM0IiwgIjAiLCAiMCIsICIxMjM0Il0sClsiMTIzNCIsICIwIiwgIjAiLCAiNDMyMSJdLAoKWyI0NDQ0IiwgIjEiLCAiMCIsICIxIl0sClsiNTU1NSIsICI1IiwgIjAiLCAiNTUiXSwKWyIxMjM0IiwgIjEiLCAiMjMiLCAiNCJdLApbIjEiLCAiMCIsICIwIiwgIjAiXSwKWyIxMDAxMDAxIiwgIjAiLCAiMTAiLCAiMTAiXQpd)
```
Sample input: U = [1447, 17, 4, 0]
íp            Repeats each value of U by it's index amount e.g. ["","17","44","000"]
  fn          Remove all falsy values when converted to a number e.g. ["17","44"]
    ¬         Concatenate e.g. "1744"
     á        All permutations e.g. ["1744","1744","1474","1447","1474","1447","7144","7144","7414","7441","7414","7441","4174","4147","4714","4741","4417","4471","4174","4147","4714","4741","4417","4471"]
      øUg     Does it contain the first item of the input? 
```
[Answer]
## Racket, ~~149~~ ~~107~~ 98 bytes
```
(λ(r b s g[h(λ x(sort(string->list(apply ~a(remq*'(0)x)))char<?))])(equal?(h r)(h b s s g g g)))
```
[Try it online!](https://tio.run/##dZFLTsQwDIb3PYUlFthISEnjqBvEHASxCENfopROGqRhw8W4A1cqSZOOoC1JZCv67N92Ys3xpXTTVWf6Gux8yfC5rNq@hGrC7y@08AQj1A@Nv8AZxzfrcHS27evb@64dHZph6D7g06AtX0831yjoTETHxti7A9EjYXl6N90BG7DkTVDzemH7sImyDAev5roesAKGuGYv/CH6wyVzEZAsYtCaF8ySF@7zecXZr9/6W651QgCaN/paRa5SkN5ypZd8teWX@sHvzJdwzN/pT@ZqDpj93vskziqXC99tQKYCcj2AjgNqvT/gpUAwudrky/SB4r8PFCIc70MTIvDpBw)
First time golfing in Racket, so still looking for improvements...
Explanation (of the original longer version, but same idea):
```
(λ(r b                              ; take rep and badges as arguments
     [g(λ(x)                        ; helper function g which takes a string
         (sort                      ; and returns the sorted
           (string->list x)         ; list of characters
           char<?))])               ; (sort by ascii code)
  (equal?                           ; compare...
    (g(~a r))                       ; g called on the rep converted to string
    (g                              ; and g called on...
      (string-join                  ; the concatenation of
        (map ~a                     ; the stringified elements of
             (append*               ; the flattened list given by
               (filter              ; the elements of the following list where
                 (λ(x)(>(car x)0))  ; the badge count is nonzero:
                 (map make-list     ; repeat the badge counts
                      '(1 2 3)b)))) ; 1, 2, and 3 times respectively
        ""))))
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 10 bytes
```
xJ$¹ƇV,Ṣ€E
```
[Try it online!](https://tio.run/##y0rNyan8/7/CS@XQzmPtYToPdy561LTG9f///9GGBjoKIGwQ@9/QwACEAA "Jelly – Try It Online")
Argument 1: `[Bronze, Silver, Gold]`  
Argument 2: `Rep`
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 24 bytes
```
1Ｆ⁴Ｆ↨ＮχＦι⊞υκＦχ¿⁻№υι№θＩι⎚
```
[Try it online!](https://tio.run/##NYy7DoMwDEX3fsUVkyNRCUSZ2MrUoYhfSFEQUdOkTWJ@P7X6sAdf6@jcZdNxCdqVMkfrM1VtpYbDGiLopPC5Z50MXfyT88SPm4mkarSN@lGrMHPaiGvc/6ZQ2BV0tZ4TjYGlWLgV8fu8JOiURZbB6IyW1qGUvpNFgw59Oe7uDQ "Charcoal – Try It Online") Link is to verbose version of code. Takes input in the order rep, bronze, silver, gold and outputs `1` if the rep is valid. Explanation:
```
1
```
Assume the rep is valid.
```
Ｆ⁴Ｆ↨ＮχＦι⊞υκ
```
Loop over the four input values. Push each digit of each value `i` times where `i` is the 0-indexed index of the value. Numeric base conversion is used here as that converts `0` to an empty array.
```
Ｆχ¿⁻№υι№θＩι⎚
```
Check the count of each digit in the array matches that in the first input. If any differ, clear the canvas.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 18 bytes
```
DẋṠƊ€ẋ"3RU¤FṢ⁼⁴DṢ¤
```
[Try it online!](https://tio.run/##y0rNyan8/9/l4a7uhzsXHOt61LQGyFQyDgo9tMTt4c5Fjxr3PGrc4gJkHVry//9/Ax0FEx0FQ/P/hiYm5gA "Jelly – Try It Online")
this is a *bit* bad
[Answer]
# [Python 2](https://docs.python.org/2/), ~~80~~ ~~79~~ ~~77~~ 68 bytes
```
lambda r,g,s,b:S((g>0)*3*`g`+(s>0)*2*`s`+(b>0)*`b`)==S(`r`)
S=sorted
```
[Try it online!](https://tio.run/##RYsxDsMgEAR7v4ISyBXHoTSRyCdoU5yRYxIpsS2g8esJuHC0u9JIo9328loXqrN71M/4DdMoEkTIEG5eynhHpa3myBeZO5Pm3Dh05sDKOS85sRq8y2sqz6lu6b0UMUtjyCAiWRAGgcCq4VSIvSDwcG1/d7UtIFrbEVX9AQ "Python 2 – Try It Online")
Takes input as `rep, gold, silver, bronze`.
[Answer]
# [Perl 5](https://www.perl.org/) `-lF`, 62 bytes
```
map{@r=sort/./g,@r if($_=<>x$_)>0}1..3;@F=sort@F;say"@r"eq"@F"
```
[Try it online!](https://tio.run/##K0gtyjH9/z83saDaoci2OL@oRF9PP13HoUghM01DJd7Wxq5CJV7TzqDWUE/P2NrBDazEwc26OLFSyaFIKbVQycFN6f9/cxMTQxMuQ3MuAy6Tf/kFJZn5ecX/dX1N9QwMDf7r5rgBAA "Perl 5 – Try It Online")
Takes input on separate lines as
```
reputation
bronze
silver
gold
```
[Answer]
# [Husk](https://github.com/barbuz/Husk), 10 bytes
```
€mdPfIṁdṘN
```
[Try it online!](https://tio.run/##yygtzv7//1HTmtyUgDTPhzsbUx7unOH3////aENzHRMdg9j/hiYm5gA "Husk – Try It Online")
Similar to the Japt answer.
Takes `[bronze,silver,gold]` as first argument, `rep` as second argument.
## Explanation
```
€mdPfIṁdṘN  
         N natural numbers
        Ṙ  repeat medals that many times
      ṁd   get all their digits as a single array
    fI     filter out zeroes
   P       permutations
 md        mapped to their base-10 numbers
€          is rep in the list?
```
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 66 ~~69~~ bytes
-3 bytes thanks to mazzy
```
''+($args|%{"$_"*$i++*!!$_}|% t*y|sort)-eq(''+$args[0]|% t*y|sort)
```
[Try it online!](https://tio.run/##ZZLBasMwDIbP81OombvaSQp2bBMYdMc9wW6jlB7SbZDRLekYo8mzZ7YcN04rHBB8/y9Zkb@Ov1XTvld1PdDD5jysVhmj@@at7ZbnhO6SlH5kWbpY0F3fLeGU/nXtsTnxdfXNrBSVr2Ibo6EnhH7CBhhhOgeBR/McfNyvn@Cl@akIk1qXHuYgSxRMsNRaakQi0AlqG4GNlWNoDBLjBFdljXLQc3XttFB5qm6dvuc4jQ2LZzDcR4yTRnMW6uJ0@cwZQ60KGcPQVHpr@IWOP@/r1t3YTOMYE3Ueua9u/YWadhDz0Fpc9jPnQrjj@@PHecTtnu0zIXcJZXRnnwEHTFRIipDILX@EBDJgD/QAqAUUAqrAS0g//AM "PowerShell – Try It Online")
Takes input at (Rep, Bronze, Silver, Gold)
Figure I'll take a crack at my own question. Converts the numbers `toCharArray`s and sorts them. Appends an empty string so the sorted arrays are converted back to space-separated strings which can then be compared.
We handle 0 medal counts with `!!$_` which doubly negates the number, making it go `non-zero number-> 0 -> 1` or `0 -> 1 -> 0` which is used to blank the repeat counter.
[Answer]
# Wolfram Language (Mathematica), ~~69~~ 68 bytes
```
i=IntegerDigits
Sort@i@#==Sort[Join@@i/@Select[{##2,##3,#4},#!=0&]]&
```
Defines an anonymous function; takes inputs to function as [reputation, bronze, silver, gold].
I think this method for repeating silver and gold is interesting (and unique among these answers): in an anonymous function, `#n` represents argument n and `##n` represents a sequence of arguments from argument n to the end, so if one were to expand `{##2,##3,#4}`, it would become `{#2,#3,#4,#3,#4,#4}`, which repeats each the necessary number of times while being 7 bytes less than the expanded form.
]