fork download
  1. def n = 7876541
  2. def newN = n.toString().split('').findAll{it}.sort().reverse().join()
  3. println newN
Success #stdin #stdout 0.87s 4456448KB
stdin
Standard input is empty
stdout
8776541