Skip to main content
1 of 2
Jo King
  • 47.5k
  • 5
  • 125
  • 186

Perl 6, 59 bytes

{($^a,{.round(10**($++-15))}...^0|any 10 X**^30-15)[*-$^b]}

Try it online!

Jo King
  • 47.5k
  • 5
  • 125
  • 186