20th problem done with a javascript solution that will take weeks
fast javascript solution