Last active
February 19, 2016 12:39
-
-
Save greymd/3865f73b3c6159347657 to your computer and use it in GitHub Desktop.
100までの素数分割。ひどいアプローチ。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Q https://twitter.com/tmnghryk/status/700073381454974976 | |
# A | |
time while true; do factor {2..100} | awk '$0*=!$3' | xargs | perl -anlE '{for (@F) { $i=int(rand(2)); $su[$i]+=$_; $s[$i].="$_ "} }END{say "$s[0]: $su[0]\n$s[1]: $su[1]"}' | grep -E '530$' && break ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment