QuoteOriginally posted by: Traden4AlphaYes, there certainly are solutions to this problem using +, and *. The funny part was the unstated requirement of doing it in integers and the notion that the problem poser had a very specific means-of-solution in mind and would not accept solutions that meant the original requirements.A secondary issue is that although the solution can be written in various programming languages with various degrees of terseness and elegance, the problem statement was written in English. Why can't we state problems in the same language that we state the solutions?Will programming languages always be second-class languages as long as one still needs English in order to define the problem?OP was probably obsessed/concerned with performance. Implicit requirement. Aka Requirements Elicitation, that's life.Mathematically, output is an integer, so sqrt(5) is an aberration.Anyways, the problem can be done with integers. QuoteWill programming languages always be second-class languages as long as one still needs English in order to define the problem?In that sense, yes. But its' a wee bit navel-gazing.
Last edited by Cuchulainn
on February 2nd, 2015, 11:00 pm, edited 1 time in total.