7 kyu
The Sum and The Rest of Certain Pairs of Numbers have to be Perfect Squares
382 of 784raulbc777
Loading description...
Fundamentals
Mathematics
View
Career Accelerator
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Difficult for a 7 kyu. Succeeded on my 3rd algorithm, after previous efforts timed out. Without giving too much away I think the trick is to work backwards, starting at the answer. I expect the more challenging version of this will be impossible.
Please review: C++ Translation
Approved by author secretly
Approved!
Language: JavaScript
Setup suit generate errors:
SyntaxError: Unexpected end of input at Object.compileFunction (node:vm:360:18) at wrapSafe (node:internal/modules/cjs/loader:1088:15)
the function is missing the closing brace
JS Node 14. should be enabled
Python new test framework should be used
Done for Python.
Description should be language-agnostic
The mention regarding future release of diffcult version should be removed and replaced with the corresponding link
Python 3 should be enabled.
Done.
The more challenging version of this kata was released.
Suggestion: you may link it in the description of this kata ;-)
When do the difficult version come? :D
Thanks for reminding me. :) I'll do it soon.
This comment has been hidden.
Your code is inneficient. I tested in the edit version and gives the same message. The runtime average of mine is below 5000 ms. In the first line you have the problem. You are duplicating the amount of pairs m, n. Hope that you can improve it. People are solving in Python without problem at this very moment. The system is working ok.
thank you
Description modified, with some errors corrected and expression formalized.
Thanks for your observation and feedback.
The third of the example tests has a syntax error, its missing a closing parenthesis. :)
Thank you Christian for this observation. It's solved
Two of the test cases have unmatched parentheses.
"Bellow" is spelled "below". "Intger" should be "integer".
It may be helpful to state m < upper__lim sooner in the kata (perhaps with the other restriction m > n > 0). You do mention it should be below 10, but you don't specify what "it" is until later. In the first example, "it" could refer to m + n.
My algorithm is terrible, but it passes. Not sure if a second part is necessarily the way to go. Maybe force us to handle larger upper__lim in this one.
This comment has been hidden.
The idea of a second part (a next kata), is to show the importance of using maths, properties of numbers, obtaining constraints, etc; our algorithms will be more agile. They still may be brute force ones, but with this help, will be faster and using less memory indeed.
I think the description is clearer now that you explain the constraint earlier. A further improvement might be to start with the requirements for the kata and follow with the cases/examples and explaination. Marking as resolved.