Skip to main content
1 of 3
Erik the Outgolfer
  • 40.8k
  • 5
  • 46
  • 125

05AB1E, 15 bytes

θ¹¨S3X‚7∍*O(T%Q 

Try it online!

Erik the Outgolfer
  • 40.8k
  • 5
  • 46
  • 125