This comment is hidden because it contains spoiler information about the solution
for readability. of course you could omit AS in this kata
Actually, your solution should return 'Publish!' for 1 or 2 good ideas. Other than that, your solution looks pretty good!
Try adding a continue; after your k = k - 1;
tip: be careful so that \n occurs only between the rows, and not on the peripheries
true if the sum of the squares of each element in a is strictly greater than the sum of the cubes in b.
You're counting squares, not cubes.
The first number could be greater than 1, and you'll be adding numbers that shouldn't be in the answer. For example, if the input was 2 and 5.
That's because you have to read how range works, the upper limit is not included.
Why are you adding up integer plus limit? Use limit as the upper limit.
Read ebulating's post below, he had the same problem.
Loading collection data...
This comment is hidden because it contains spoiler information about the solution
for readability.
of course you could omit AS in this kata
This comment is hidden because it contains spoiler information about the solution
Actually, your solution should return 'Publish!' for 1 or 2 good ideas. Other than that, your solution looks pretty good!
Try adding a continue; after your k = k - 1;
tip: be careful so that \n occurs only between the rows, and not on the peripheries
You're counting squares, not cubes.
The first number could be greater than 1, and you'll be adding numbers that shouldn't be in the answer. For example, if the input was 2 and 5.
That's because you have to read how range works, the upper limit is not included.
Why are you adding up integer plus limit? Use limit as the upper limit.
Read ebulating's post below, he had the same problem.