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.
But if the sum is a perfect square itself doesnt that makes finding two factor for it redundant.
and also in sample test setter himself has given us an example in which one factor is 0.
The tests fail when one of returned numbers is 0, while description says the answer needs to be non-negative.
As a temporary workaround you can try to return such pair, where none of the numbers is 0. For example, tests fail for:
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I used pointers for the high and low values(0.1ms), ive tried to use sets and compliments aswell(10s). Kinda running low on ideas but im thinking circle equations have something to do with it. Am i right?
Don't try to solve in a brute-force approach.
Try thinking in mathematics perspective
my code runs in O(n) times. I'm confused on what time complexity is expected. If you could solve this, what was the complexity of your code.
Good Kata,
5 and Above Katas need good knowledge on Mathematics, Data Structures and Algorithms.
Learnt something new from this kata!
Yes, there was a small bug.
Fixed it and all tests passed :)
Your answers seem to be incorrect:
Failed scenarios:
input : 1179090294573338820122431368020571219193838496144981853128507405455819949176596069394854257633924
my output : 1085859242523329457395988099999999999999999999999
input : 85767278828367782602943401434250693589891146724341410177841229729859128397916522826887698538486
my output : 292860510872271379029706058286709999999999999999
Can you validate whether my outputs are correct ?
Java language
The 7 Basic Tests are passed
After clicking 'ATTEMPT' the randomTestsNoRemainder and randomTests are failing
What language? What are inputs causing your solution to fail?
@hobovsky can you help me
My program is giving correct output but the test cases are failing with below error :<
expected:<858523985810[444263251626]> but was:<858523985810[999999999999]>