Skip to content

Instantly share code, notes, and snippets.

@kiritsuku
Created November 13, 2012 12:57
Show Gist options
  • Select an option

  • Save kiritsuku/4065631 to your computer and use it in GitHub Desktop.

Select an option

Save kiritsuku/4065631 to your computer and use it in GitHub Desktop.
project euler problem 32 - one line and unreadable
(100 until 10000).par.filter(x=>(2 to math.sqrt(x).toInt).filter(x%_==0).find{p=>val str=s"$p$x${x/p}";str.length==9&&str.sorted=="123456789"}.isDefined).sum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment