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.
Please use spoiler flag next time you explain a solution.
This comment is hidden because it contains spoiler information about the solution
Could you please explain how this works?
Why do you want to put a colon there? We need to separate two arguments (r and s) that are passed to the function.
Can somebody explain to me why the colon is not take into consideration when using "auto r" and "auto s"?
at least it is faster than calculating all primes
Yea... you didn't help one bit. Your reponse is as vague as the first. Either you believe everyone is at the same level as you or you're bad at explaining concepts and probably like the back and forth conversation. Anyway I will figure it out. Thanks for showing your ego it helped a lot.;)
Because of this condition (b >= 10 ** 9).
I don't like to speak with people from "doesn't make sense" point of view.
Take care
I understand what you said but there is no way to know every single thing in math so... yea.
Also could you explain why -c/b; works ?
or did you just look at the solutions ?
Study nathetatics!
what you have here doesn't make any sense ?? why does your work but what i wrote doesn't
#include
double quadratic(double a, double b, double c)
{
double discriminant = (b * b) - (4 * a * c);
double x = sqrt(discriminant);
double x2 = ((-b ) + (x))/2*a;
return std::abs(x2) < 1e-12;
}
Typing "all" primes manually is best practice? I think I did not get this point.