Skip to main content
1 of 7
ElPedro
  • 6.5k
  • 2
  • 24
  • 38

#Python 2, 74 bytes

Having already been soundly beaten by @Flp.Tkc I'll just post my 74 byte recursive solution because it works and not because it will win.

def f(a,b,c=1):
 print(`c`,"Shaggy")[c%b<1or`b`in`c`]
 if c<a:f(a,b,c+1)
ElPedro
  • 6.5k
  • 2
  • 24
  • 38