fork download
  1.  
  2. x = 24987654
  3.  
  4. x -= x % (10 ** (Math.log(x, 10).to_i - 1))
  5.  
  6. puts x
  7.  
  8.  
Success #stdin #stdout 0.01s 7408KB
stdin
Standard input is empty
stdout
24000000