Skip to main content
2 of 2
added 44 characters in body
Veskah
  • 4.1k
  • 13
  • 29

PowerShell, 66 69 bytes

-3 bytes thanks to mazzy

''+($args|%{"$_"*$i++*!!$_}|% t*y|sort)-eq(''+$args[0]|% t*y|sort)

Try it online!

Takes input at (Rep, Bronze, Silver, Gold)

Figure I'll take a crack at my own question. Converts the numbers toCharArrays 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.

Veskah
  • 4.1k
  • 13
  • 29