Mini-challenge: MAX(factors of 2 or 5)
|
01-19-2018, 10:38 PM
Post: #14
|
|||
|
|||
RE: Mini-challenge: MAX(factors of 2 or 5)
While I can appreciate your desire for a less brutish approach, Joe, I think it's going to be difficult to outperform your original method with standard RPL. FACTORS admittedly does more than is needed, but its speed makes it an attractive command to utilize here.
Just for something different, here's an alternative approach that still uses FACTORS, and what it lacks in elegance is more than made up for in obfuscation : Code: \<< Slightly slower than your original method, and still just parses the FACTORS list to get the needed values. It is a bit smaller, though. Could be even shorter if 0 doesn't need to be considered for input. Personally, I don't see anything wrong with your initial approach. It is much clearer than the above monster, and that (to me) is far more valuable than the few bytes saved. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)