Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
time squaresums.sh 60000000 -> 1, 9, 99, 10954, 59999999 == real 0m0.027s
actually solvable in under 90 mins using a shell script thats about 50x 'better' than 12s.
dudes...
why would that make a diff, absolute size is meaningless. its about the geom of the input.
time squaresums.sh 100000 -> 1, 2, 4, 13, 447, 99999 == real 0m0.028s
time squaresums.sh 1000000000000 -> 5, 22, 1261, 1414213, 999999999999 == real 0m0.023s
this result is from my shell-script.
its not hard to beat when you're not being so literal. :)
time primegap 42 1000000 1001000
1000039 1000081
real 0m0.009s
user 0m0.008s
sys 0m0.000s
time primegap 2 10000000 10001000
10000139 10000141
real 0m0.012s
user 0m0.008s
sys 0m0.004s
wow. immediately disliked 7 of the 10 other shell solutions. :)
great puzzle, lmao, only realized what the quesion was after solving the general problem.
This comment is hidden because it contains spoiler information about the solution
dismissed sed and hammered out/nailed the array solution before i knew sensei thought they were hard :)
This comment is hidden because it contains spoiler information about the solution
hahahaha! its my 2nd day here and i thought that doing a bash kata
meant that i had to restrict my self to bash! hahahaha. great joke sensei!
next up generating .elfs via echo -e!